Jump to content

Archived

This topic is now archived and is closed to further replies.

NL_Johan_UK

Too many connections

Recommended Posts

I suppose this is a luxury problem, it show increasing visitors BUT!

 

My site is messed up...

 

Warning: mysql_connect() [function.mysql-connect]: Too many connections

 

MySQL Error : Connection Error

Error Number: 0

etc..

 

What can I do to stop this?

 

Use mysql_close()?

 

It doesnt seem to get better, in fact non of the site appears when I add that in the last script that is being executed...

 

Help is appreciated!

Share this post


Link to post
Share on other sites

I don\'t know how to get direct access to the server. I do everything through ftp and phpmyadmin.

 

How do I access httpd.conf? Is there anything I can change in phpmyadmin?

 

I have mysql_close(); under every page now but occasionally the error still shows up.

 

When I do \"SHOW PROCESSLIST \" as a query in phpmyadmin I get a list of 16 sleeping threads. Some for as long as 23000 + seconds.

Can I kill all them without harm?

 

Now Im closing all connections none should stay sleeping should they?

Share this post


Link to post
Share on other sites

Nothing can be done from ur side

 

try to talk to ur host providers and see what they say?

 

I don think u will have permission to edit the config file and change settings!

Share this post


Link to post
Share on other sites

I havent tried that out

 

but the format is like u have to get the connection_id() and the issue a kill to do that.

 

Try searching in mysql hompage may be u will get an idea

Share this post


Link to post
Share on other sites

http://www.mysql.com/documentation/mysql/b...any_connections

 

GRANT priv_type [(column_list)] [, priv_type [(column_list)] ...]

   ON {tbl_name | * | *.* | db_name.*}

   TO user_name [iDENTIFIED BY [PASSWORD] \'password\']

       [, user_name [iDENTIFIED BY \'password\'] ...]

   [REQUIRE

       NONE |

    [{SSL| X509}]

[CIPHER cipher [AND]]

[iSSUER issuer [AND]]

[sUBJECT subject]]

   [WITH [GRANT OPTION | MAX_QUERIES_PER_HOUR # |

                         MAX_UPDATES_PER_HOUR # |

                         MAX_CONNECTIONS_PER_HOUR #]]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.