| 9:16 pm on Sep 25, 2005 (gmt 0)|
Maybe this is caused by the Max Conn Errors setting in the Networking configuration of the MySQL server. This is the number of interrupted connections from a host before MySQL decides to block the host. It could be that MySQL is blocking your IIS/PHP server after a number of connection errors.
| 9:32 pm on Sep 25, 2005 (gmt 0)|
Thats a very good point! Is there any way to remove this feature?
| 10:14 pm on Sep 25, 2005 (gmt 0)|
I am using MySQL Administrator on Windows 2000. The setting is under "Startup Variables" and tab "Networking" somewhere near the bottom of the page. If you enable the option, it will write a line max_connect_errors=XX in the my.ini file in your MySQL system directory. Removing the line from my.ini should disable the host block feature.
| 8:08 am on Sep 26, 2005 (gmt 0)|
Thanks! Just checking though, would this be fixed by restarting the IIS server, and not the MySQL server? As that is how I do a temporary workaround.
| 2:01 pm on Sep 26, 2005 (gmt 0)|
I've just checked and its not in the my.ini file anway, so doesn't look like it could be that.
The site went down again today, and its driving me crazy :(
| 2:34 pm on Sep 26, 2005 (gmt 0)|
What type of database connections are used by the applications -- persistent connects? non-persistent?
Opening too many persistent connects but never closing them may be a problem but should give you some 'too many sessions' error messages.
Is there a firewall in between the 2 servers, which may cut long running sessions?
On Linux systems I would check the logs first, but don't know how the log situation is in Windows -- is there an IIS log you could look into? Does the PHP indeed say 'timeout' only? What is in the MySQL log? Try to gather as much log information you can get, on both ends.
| 3:00 pm on Sep 26, 2005 (gmt 0)|
It doesn't say timeout as such, but it looks for the DB connection for a while and then gives a generic no MySQL connection error : 0
It is using persistant connections, do you think it would help if that was changed? No firewall between the two servers either.
I'll have a look at the logs now and see what I can find.
| 3:03 pm on Sep 26, 2005 (gmt 0)|
My appologies, it isn't using persistent connections. PHP.ini is set up to allow them, but the script is set to disallow it.
| 3:25 pm on Sep 26, 2005 (gmt 0)|
... OK, then I am run out of ideas for now.
Hopefully you will dig up some interesting stuff from your logs.