php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3802 PHP mysql_pconnect seems inefficient
Submitted: 2000-03-10 15:06 UTC Modified: 2000-03-20 02:23 UTC
From: danbeck at mtginfo dot com Assigned:
Status: Closed Package: MySQL related
PHP Version: 3.0.14 OS: Linux 2.2.12
Private report: No CVE-ID: None
 [2000-03-10 15:06 UTC] danbeck at mtginfo dot com
Ok, I stupidly submitted a bug report about mysql_pconnect being broken and I'd like to change my bug report to a constructive design gripe. =)

If you have to have one mysql connection per web server thread or child why even bother using mysql_pconnect?  For a server with 10+ children, you are talking about a lot of memory waste.  It would make much more sense to use one connection for all children.  I imagine that the way that the apache server works and the way threading is in the mysql client libraries would keep this from being possible, but please, please consider adding this to the mysql_pconnect documentation.  The blurb about this in the faq has not always been there and those of us who've read the faq before, in particular the persistant connection part, don't always think about seeing if that one section has been updated.

And also...  Although this is the intended operation of mysql_pconnect, as evident in the amount of bug reports about it, it's not the way that people would expect or hope that it would work.  It's useless to me because I have to set my query buffer memory high due to the amount of data I move back and forth through queries.

Please take this as constructive feedback.. PHP is still THE best web server module on earth.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-03-20 02:23 UTC] rasmus at cvs dot php dot net
A MySQL connection does not eat up very uch memory at all.  Having one connection per httpd is extremely useful.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 07:01:32 2024 UTC