July 17th, 2000, 08:34 AM
I had the "Too many MySQL connections" error on a page that is password protected to 150 users, and it uses one simple table and a simple SELECT * FROM table.
The site wasn't launched or noticed, so all 150 users can't hit it at the same time.
What can cause this upsetting error?
¬ peterbe.com ¬
July 17th, 2000, 09:15 AM
If your on a virual host it may have been being accessed by other people on other sites (just a guess).
July 17th, 2000, 10:38 AM
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by ledjon:
If your on a virual host it may have been being accessed by other people on other sites (just a guess).[/quote]
Are you using persistent connections? ie. pconnect
Or perhaps you're not closing your tables when the script finishes. Do an explicit close on all variable and tables and flush the db every so often.
July 18th, 2000, 12:53 AM
Ok, weirdest thing happened to me too, right after reading this topic - I got the same error (too many connections). I never used pconnect, so I know that's not the problem. When anyone care to explain what a) flush does and b) how mySQL counts the number of connections (are they considered opened if you never called mysql_close) ? I actually never did use mysql_close because I never thought that it had a use (coming back to haunt me apparently). Anyway, anyone know how to combat this problem without flushing since I can't even access MySQL from command line. Thank in advance.