Jump to content


Photo

Too many connections


  • Please log in to reply
8 replies to this topic

#1 NL_Johan_UK

NL_Johan_UK
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 28 April 2003 - 06:46 PM

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!

#2 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 28 April 2003 - 07:04 PM

Try to Increase the maximum connections in mysql by editing the httpd.conf
Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks

#3 NL_Johan_UK

NL_Johan_UK
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 28 April 2003 - 08:49 PM

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?

#4 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 28 April 2003 - 08:51 PM

are using a remote server or do u have ur own server?
Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks

#5 NL_Johan_UK

NL_Johan_UK
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 28 April 2003 - 09:12 PM

got a hosting deal, so remote.

#6 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 28 April 2003 - 09:14 PM

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!
Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks

#7 NL_Johan_UK

NL_Johan_UK
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 28 April 2003 - 09:31 PM

But can I kill those seeminly pointless threads that are sleeping?

#8 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 28 April 2003 - 09:40 PM

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
Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks

#9 shivabharat

shivabharat
  • Members
  • PipPipPip
  • Advanced Member
  • 371 posts
  • LocationChennai, India

Posted 30 April 2003 - 09:27 PM

http://www.mysql.com...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 #]]


Knowledge --- Reading Enriches Mind But Sharing Enhances It.[br][br]Note: Before you request help enusre that you have had a look at the tutorials @phpfreaks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users