httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Martin <li...@chriscodes.com>
Subject [users@httpd] Re: Apache/MySQL/PHP/Persistent Connections
Date Thu, 27 May 2004 18:12:55 GMT
Robert Andersson wrote:
> Message[plain text, please...]
> 
> Steven Michaels wrote:
> 
>>Hi, I have a rather database-intensive website that relies on MySQL.
>> I have recently set up Apache and continue to receive "Too many
> 
> connections"
> 
>>errors.
>>
>>(...snip...)
>>
>>MySQL
>>max_connections = 100000
>>max_user_connections = 100000
>>max_connect_errors = 999999
> 
> 
> Although I would have thought those numbers would be enough, I suggest
> simply restarting MySQL once a day (or so). I started getting those errors,
> and I think I also have max_connections set to 100000. That and a restart
> every night; I have not seen the error since.
> 
> I think it is a PHP issue, leaving behind dead connections. I have not
> bothered to investigate it much, but you might be able to find something in
> PHP's bug database. At least, it is not Apache at fault.
> 
> Regards,
> Robert Andersson

Robert's right, it's probably PHP.
If you're using mysql_pconnect(), and have no real reason to, that could 
be the problem. You may try mysql_connect() instead.

See this for more info:
http://www.sitepoint.com/forums/showthread.php?t=169452&goto=nextnewest

-- 
Chris Martin - Web Developer
Open Source & Web Standards Advocate
http://www.chriscodes.com/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message