ID: 15417 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: MySQL related Operating System: Debian Linux 2.4.10 PHP Version: 4.1.1 New Comment:
httpd.conf: MaxClients 250 Mysql server variables: max_connections 400 This is my current configuration. And I also checked number of processes on https server and mysql server when I got the error. http server had apprx 10 active and 20 idle servers and mysql server have ~15 processes. Everything seems fine to me. Is that a configuration problem? Previous Comments: ------------------------------------------------------------------------ [2002-02-07 13:51:33] [EMAIL PROTECTED] Well, it isn't a bug at all actually. pconnects need one connection to MySQL per Apache child / User Id. You can either limit your apache children, or increase the maximum number of connections that MySQL allows. I'm marking this as bogus now, as it's more a configuration issue then a real bug. Derick ------------------------------------------------------------------------ [2002-02-07 11:48:04] [EMAIL PROTECTED] Derick, It seems that you're right. I changed mysql_pconnect to mysql_connect and used mysql_close at the end of script. I got no error for 100 execution. I remember a similar problem that I read in somewhere about persistent connections. But i could not find it. But I am sure that I did not have this problem on previous configuration. Should I close this bugreport and reopen for pconnect or leave it? ------------------------------------------------------------------------ [2002-02-07 11:27:50] [EMAIL PROTECTED] In fact I got many 'Got an error reading communication packets' errors on MySQL Server (like 5 errs / hour). I thought that, but shouldn't it give an error on mysql_query? Does mysql_num_rows requires connection to MySQL server or does it use recordset in memory? ------------------------------------------------------------------------ [2002-02-07 11:19:22] [EMAIL PROTECTED] My hitch is that you're running out of mysql connections for some reason... add this and check it: mysql_connect() or die ("error"); of course use the normal mysql_connect function (with all parameters). Derick ------------------------------------------------------------------------ [2002-02-07 11:07:18] [EMAIL PROTECTED] I never had problems with semi-colons at the end of queries. But neverthles I removed semi-colons and tried again. The result was the same. For 10 execution I got two errors: [07-Feb-2002 09:52:21] PHP Warning: 34 is not a valid MySQL result resource in /usr/local/webhosts/www_asenashop.com/test.php on line 37 [07-Feb-2002 09:52:48] PHP Warning: 34 is not a valid MySQL result resource in /usr/local/webhosts/www_asenashop.com/test.php on line 37 I wonder why the error message contains specific number but not "supplied argument"? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/15417 -- Edit this bug report at http://bugs.php.net/?id=15417&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php