Need Urgent Help

Started on the old forum in December 2013 · view the original in the archive · old links redirect here

#maxconnectionsperhour #mysql

5 replies · 458 views · started 12 years ago · 1 min read

4 participants
Lue_chin Developer · 107 posts #1

Hello seniors My site name is videos.3gx.in and after 2-3 days i face this problem user has exceeded the 'max_connections_per_hour' resource (current value 1) Please guyz help me I used Mysql-pdo and traffic 200 users and 1000 page-views per day Database entries 5lakh rows Hostgator shared plan Please help me to solve this problem

pmbguy Senior · 344 posts #2

ok, i googled the error message n found this:

mysql - 'max_user_connections' set to 200 - still getting error - Stack Overflow

also, do you close the connection to database at bottom of page, this might help reduce the number of active connections

$link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); //this code is for mysql, not mysql-pdo
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link); //this line here is for mysql

FROM link above:

As for your "max connections" problem, it could be one of three things:

  1. The server has too many open connections already. A MySQL server can only handle a specific number of open connections before refusing to allow any more, and this limit is shared amongst all users of the server. It's usually set quite high, although it's easily possible for someone to effectively DoS a MySQL server by making lots of connections (but see below)

  2. Your user account has a limited number of connections allowed per hour - any further connections within that hour would be rejected. This is set on a per-user basis.

  3. Your user accounts has a limited number of allowable open connections - any further connections would be rejected. This is set on a per-user basis.

so i guess maybe have a chat with hostgator too, but I'm guessing from the code and what i read, your account has a max limit on connections, so at an uneducated guess, try figure out how to close connections...

hope this helps...

something else Fellow · 2,296 posts #4

Hostgator seem to be causing you many problems - maybe time for a host change?

something else Fellow · 2,296 posts #6

I'm not the right person to ask that 😛 However you may wish to check gumslones post here

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close