php.net |  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dgarrett at acm dot org
New email:
PHP Version: OS:

 

 [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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-30 09:01 UTC] sniper@php.net
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-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC