[wp-hackers] Closing Mysql connections
Andrew Gray
andrew at graymerica.com
Fri Mar 19 13:49:58 UTC 2010
I will start with the statement that this wordpress site is on a server where I do not get to control apache or mysql. It is at Rackspace Sites, which is a LAMP stack where you only get FTP access. I get a ton of traffic and I am running into max mysql connection errors. My max user connections is set at 500. I really want to stay on this platform because of the support I get there and the price. My traffic profile is unique and I have all the caching I can use.
Im trying to figure out why there is no call to mysql_close anywhere in wordpress.
Is it just assuming that the connection will be automatically closed when the script ends?
Is there an action or hook I can tie into to close the DB connection manually to ensure that if apache processes hang on they do not stay around. Can I use the hook shutdown?
Does anyone know why there is no mysql_close() in the wordpress code.
Any insight into this would be very helpful before I go and start breaking stuff.
thanks,
Andrew
More information about the wp-hackers
mailing list