Re: mysql_pconnect() made things worse

2006-12-01 Thread Jacques Marneweck

Brian Dunning wrote:
I have many sites accessing one MySQL server, all using the same IP, 
username, password via a PHP $connection = 
mysql_connect($ip,$user,$pass);.


The server is extremely busy, hammered 24x7, but almost all traffic is 
coming from one very short script. About once a day we're getting No 
database selected with that one table busy and the only way out is 
mysqladmin flush-hosts.


In that one busy script, I replaced mysql_connect() with 
mysql_pconnect() according to some advice I received, and the server 
immediately went back to No database selected and all hung up.


Everything I read seemed to indicate that what I did should have made 
things better, not worse. Can someone suggest what my next steps 
should be?
Check your max_connections setting which shows how many connections your 
server will allow at any time:


SHOW VARIABLES LIKE '%connections%';

And checking status:

SHOW STATUS LIKE '%connections%';

Will tell you how many connections you've used simultaneously.

Regards
--jm

--
Jacques Marneweck
http://www.powertrip.co.za/
http://www.powertrip.co.za/blog/

#include std/disclaimer.h


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



mysql_pconnect() made things worse

2006-11-30 Thread Brian Dunning
I have many sites accessing one MySQL server, all using the same IP,  
username, password via a PHP $connection = mysql_connect($ip,$user, 
$pass);.


The server is extremely busy, hammered 24x7, but almost all traffic  
is coming from one very short script. About once a day we're getting  
No database selected with that one table busy and the only way  
out is mysqladmin flush-hosts.


In that one busy script, I replaced mysql_connect() with  
mysql_pconnect() according to some advice I received, and the server  
immediately went back to No database selected and all hung up.


Everything I read seemed to indicate that what I did should have made  
things better, not worse. Can someone suggest what my next steps  
should be?


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]