Re: [PDO] PostgreSQL auto-reconnect in PDO contructor for permanent connections: request for comments
[email protected] (Lester Caine) Thu, 01 Apr 2010 07:01:56 +0100
| Newsgroups | php.pdo |
|---|---|
| Message-ID | <[email protected]> |
Wez Furlong wrote: > Honestly, the driver is broken if it does not correctly detect a dead > connection, or if it blocks indefinitely. It doesn't really matter what > the user wants in that case; what they get is unusable without manually > taking the same steps in their code. > > The postgres API is blocking by default. You can configure a timeout in > your connection string, but this does not apply to all cases (only > connection time, IIRC). In all other cases, the calls can block, and > can block indefinitely depending on the nature of the disconnect, the > locality of the server, the nature of the network hardware between the > client and the server. This of cause does not simply relate to PostgreSQL auto-reconnect. Any of the databases can loose a connection at any time, and PDO should handle that consistently, timing out rather than 'hanging'. The difficulty sometimes is knowing what is a 'hang' and what is a 'long time to process results' ? -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php