开发者

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 lig开发者_StackOverflow社区hty ~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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜