[TYPO3-core] RFC #11770: Feature: mysql_ping wrapper

Dan Osipov dosipov at phillyburbs.com
Mon Aug 24 15:42:45 CEST 2009


Steffen,

Any connection could be dropped, regardless of weather its persistent or 
not. mysql_ping simply returns false if the DB can no longer be reached 
through the previous connection object. See 
http://us2.php.net/manual/en/function.mysql-ping.php

no_pconnect is respected, since t3lib_db::sql_pconnect is called, which 
checks the no_pconnect setting before establishing a connection.

Dan Osipov
Calkins Media
http://danosipov.com/blog/

Steffen Gebert wrote:
> On Mon, 24 Aug 2009 15:27:44 +0200, Dan Osipov <dosipov at phillyburbs.com> 
> wrote:
> 
>> This is an SVN patch request.
>>
>> Type: Feature
>>
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=11770
>>
>> Branch: Trunk
>>
>> Problem:
>> Sometimes, after long DB operations, DB connection could be dropped. It
>> would be nice to have a function in t3lib_db, that would check if the
>> connection is still alive (by using mysql_ping), and if not, give an
>> option to reconnect.
>>
> Hi Dan,
> 
> I don't exactly understand, when pings should be sent. During creation 
> of the database object and if mysql_pconnect is enabled? (just for 
> interest..)
> 
> If this function can also be used wit no_pconnect=1, then please also 
> respect this setting.
> 
> Steffen


More information about the TYPO3-team-core mailing list