[PHP] How can a script tell if there's a MySQL problem?

2009-01-09 Thread Brian Dunning
I have one server that's pretty busy and runs into Too many connections from MySQL from time to time, and needs to have MySQL restarted to clear it up. I've tried everything I can think of to have PHP take note of this error but continue executing with other stuff, but no matter what I

Re: [PHP] How can a script tell if there's a MySQL problem?

2009-01-09 Thread Marc Steinert
Brian Dunning schrieb: I have one server that's pretty busy and runs into Too many connections from MySQL from time to time, and needs to have MySQL restarted to clear it up. I've tried everything I can think of to have PHP take note of this error but continue executing with other stuff, but

Re: [PHP] How can a script tell if there's a MySQL problem?

2009-01-09 Thread Per Jessen
Brian Dunning wrote: I have one server that's pretty busy and runs into Too many connections from MySQL from time to time, and needs to have MySQL restarted to clear it up. You need to restart MySQL just because of too many connections?? I've tried everything I can think of to have PHP

Re: [PHP] How can a script tell if there's a MySQL problem?

2009-01-09 Thread Bastien Koert
On Fri, Jan 9, 2009 at 11:07 AM, Per Jessen p...@computer.org wrote: Brian Dunning wrote: I have one server that's pretty busy and runs into Too many connections from MySQL from time to time, and needs to have MySQL restarted to clear it up. You need to restart MySQL just because of too

Re: [PHP] How can a script tell if there's a MySQL problem?

2009-01-09 Thread Nathan Rixham
Bastien Koert wrote: 1. Make sure you are freeing up all resources as soon as you can - mysql_close(); little thing I've done for some time that's stuck with; (php5+ only) on all of my database connection classes, I have the db close function in the destructor just to make sure ?php

Re: [PHP] How can a script tell if there's a MySQL problem?

2009-01-09 Thread Per Jessen
Nathan Rixham wrote: Bastien Koert wrote: 1. Make sure you are freeing up all resources as soon as you can - mysql_close(); little thing I've done for some time that's stuck with; (php5+ only) on all of my database connection classes, I have the db close function in the destructor

Re: [PHP] How can a script tell if there's a MySQL problem?

2009-01-09 Thread Per Jessen
Per Jessen wrote: Nathan Rixham wrote: Bastien Koert wrote: 1. Make sure you are freeing up all resources as soon as you can - mysql_close(); little thing I've done for some time that's stuck with; (php5+ only) on all of my database connection classes, I have the db close function