Recently, I have been getting the following error
Fatal error: User 'dhf' has exceeded the 'max_connections' resource (current value: 7200)
cant figure it out, can somebody help me out?
max_connections error
Moderator: General Moderators
Whoa... That doesn't look too good.
max_connections is the value set for how may mysql connections can be made. Is this on a shared hosting environment? Current value of 7200 is alot. MySQL defaults at 150. If this is the case, you may be on a over worked box. You may also want to add addiitional error handling around your mysql_connect to not show error messages. Showing the username to a potential attacker may not be a good thing. I would wrap your mysql_connect() call with an 'if' and die().
If this is not a shared hosting environment, but your dedicated server.. I would check to make sure you're not a victim of a DoS.. since that is a lot of connections to allow at a given moment.
Hope this helps
hanji
max_connections is the value set for how may mysql connections can be made. Is this on a shared hosting environment? Current value of 7200 is alot. MySQL defaults at 150. If this is the case, you may be on a over worked box. You may also want to add addiitional error handling around your mysql_connect to not show error messages. Showing the username to a potential attacker may not be a good thing. I would wrap your mysql_connect() call with an 'if' and die().
Code: Select all
if(!$connect = mysql_connect($DBserver, $DBuser, $DBpassword)){
die("Database Connection Error");
}Hope this helps
hanji
Forget it! Don't be nice to those wankers, do it the manly way (ie: use brute force until you get what you want):hanji wrote:Code: Select all
if(!$connect = mysql_connect($DBserver, $DBuser, $DBpassword)){ die("Database Connection Error"); }
Code: Select all
while(!$connect = @mysql_connect($DBserver, $DBuser, $DBpassword)) { usleep(10000); }-
leonardobii
- Forum Newbie
- Posts: 17
- Joined: Fri Sep 02, 2005 8:47 pm
foobar wrote:Forget it! Don't be nice to those wankers, do it the manly way (ie: use brute force until you get what you want):hanji wrote:Code: Select all
if(!$connect = mysql_connect($DBserver, $DBuser, $DBpassword)){ die("Database Connection Error"); }
That'll keep going until you get your damn connection. Yarrr!Code: Select all
while(!$connect = @mysql_connect($DBserver, $DBuser, $DBpassword)) { usleep(10000); }
foobar... I like it!
hanji