简体   繁体   中英

Blank page on mysql connect

I have a php function ( "mconnect") for connecting to mysql . Sometimes in full load i get a blank page with "[]mconnect: mysql_connect"
In this function i have custom messages for mysql error 1040 and 2002 -- connection errors
In logs nothing appears when this error occur
I use lighttpd 1.4.28 with php-cgi 5.2.0 and mysql 5.0.32 debian etch

Those blank pages with error appears only in full load : when mysql has Avg. questions per second = 586.39 and lighty ~300 conn/s
Both, lighty and mysql share the same machine: dual quad xeon with 8G ram

If anyone has a clue, please share

Thanks
Cris

You could increase MySQLs connection limit, like pointed out in this article: http://rackerhacker.com/2007/01/24/increase-mysql-connection-limit/

But it would be good if you also had a look over different performance tunning like query caching and the like. As well information I have found on the same website. http://rackerhacker.com/2008/06/24/mysql-error-1040-too-many-connections/

But the best approach would be to limit the number of database accesses from your application, have some caching in place and do the minimal connections to your database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM