Results 1 to 6 of 6
  1. #1

    User already has more than 'max_user_connections' active connections

    Hello Guys,
    I have one shared hosting account and i am running dynamic site there. i am facing below problem sometime where database record returns.

    Warning: mysql_connect() [function.mysql-connect]: User myuser already has more than 'max_user_connections' active connections in path/db.php on line 4
    Could not connect: User myuser already has more than 'max_user_connections' active connections

    I am closing all connections like mysql_close($con) in each file where i execute the query;

    is it just because of this ? or there could be some other issue?
    can i trace out the problem where i am missing the mysql closing connection ?

    can someone help me out ? Thanks

  2. #2
    Join Date
    May 2013

    If you are sure you are closing connections properly, ask your hosts about the current value of "max_user_connections". If it is too low and the concurrent hits to your website exceeds that threshold, this issue can happen.

  3. #3
    increasing the "max_user_connections" value ll not be beneficial if there are opened connections not closed. is there any method to trace opened connection which file or query it belongs to? so i can be 100% ensured about closing connections. there are lot of files but i have closed all connections every where might be somewhere any left. please suggest me something rather than the increasing of max_user_connections value. Regards !

  4. #4
    Join Date
    May 2013
    I was not asking to increase the value; I was mentioning a possibility. It will be very difficult to track the exact reason, especially because you are on a shared server and you have no other privileges. Ask your host and they may be able to shed some lights.

  5. #5
    Join Date
    May 2009
    Italy - Rome
    Maybe it's slow connection..
    You open many connection and not close all.
    So you may configure a timeout that do that.

  6. #6
    Join Date
    May 2012
    The most possible reason we have seen this is due to a rouge query hold up the table and any subsequent queries will wait until the above one releases. You need to check the scripts if this is the case. Ask your host, what exact query it runs at the time you get he error, also what the limit is.

Similar Threads

  1. User Vhost - maximum number of active connections limit
    By avivronen in forum Hosting Software and Control Panels
    Replies: 4
    Last Post: 04-04-2013, 06:25 AM
  2. Is it possible custom error page when user reached mysql max_user_connections?
    By sodapopinski in forum Hosting Security and Technology
    Replies: 1
    Last Post: 07-04-2012, 11:00 PM
  3. more than 'max_user_connections' active connections
    By in forum Hosting Security and Technology
    Replies: 7
    Last Post: 04-29-2007, 09:36 PM
  4. 2000 active connections with APACHE
    By Flash Speed in forum Hosting Security and Technology
    Replies: 10
    Last Post: 01-19-2006, 01:24 PM
  5. Replies: 3
    Last Post: 04-27-2005, 03:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts