|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2955 Persistant Connection Gone Bad
Submitted: 1999-12-10 20:17 UTC Modified: 2005-03-30 09:01 UTC
From: dgarrett at acm dot org Assigned:
Status: Wont fix Package: PostgreSQL related
PHP Version: 3.0.9 OS: RedHat Linux 5.2, and 6.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
10 + 44 = ?
Subscribe to this entry?

 [1999-12-10 20:17 UTC] dgarrett at acm dot org
  On at least two servers which are running PHP 3.0.9 and 4.0 Beta 3 (respectively), persistant database connections don't notice if the connection has been dropped.

  This means that if you start the DB server, and then start the web server, when the connection is established, everything is fine and dandy. If something happens to the connection (for example, postgres is stopped and restarted) the web server keeps trying to use the connection.

  It displays errors saying that the connection is dead, but keeps trying to reuse it anyway on repeated loads of the page, anyway.

  3 solutions present themselves to me. 

  Test the connection before giving it to the script. Seems best, but would involve extra overhead.

  Automatically close and restart connections after certain types of errors. At least after the scripts complete. This would allow errors to appear, but not continue to repeat indefinatly.

  Reduce the value of 'MaxRequestsPerChild' in Apache, so the connections are not reused for as lengthy a period. This avoids PHP changes, but reduces high load efficiency.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-30 09:01 UTC]
We are sorry, but we can not support PHP 3 related problems anymore.
Momentum is gathering for PHP 5, and we think supporting PHP 3 will
lead to a waste of resources which we want to put into getting PHP 5
ready. Of course PHP 4 will continue to be supported for the
forseeable future.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Sep 23 19:03:37 2021 UTC