MySQL Forums
Forum List  »  Install & Repo

Server die after too many connections - PHP issue
Posted by: Leonardo Volpe
Date: May 19, 2011 08:37PM

Server die after too many connections

Original discussion: http://forums.mysql.com/read.php?11,102988 - Thanks for helping.

Common error in PHP: "Can't connect to MySQL server on 'localhost' (10048)".

Solution to this error in a PHP script
I commented all mysql_close() functions calls - yes, I'm not closing my MySQL connections! - and prepended ob_start() & appended ob_flush() to my code as a whole.

It helped. You may have to wait too long to load but I didn't get the errors within a minute waiting.

When I use mysql_close(); the connection errors show up again.

Options: ReplyQuote


Subject
Written By
Posted
Server die after too many connections - PHP issue
May 19, 2011 08:37PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.