Please bear with me, as this is quite a hidden little bug; only showing it's face under specific circumstances. It took me a few days to track down. It might take some time explain it, but here's a summary of all that I know so far:
- What:
- MySql Error "max_user_connections exceeded" and website goes down for a few minutes, hence critical status on this post.
- When:
-
- Only on certain hosts (specifics are unclear)
- Only when logged in with notify of path changes permission in pathauto module
- Only when Verbose option is not selected on pathauto settings page
- After some indeterminate amount of page requests (specifics are unclear)
- Maybe has something to do with what page is being requested (specifics are unclear)
Details:
After building a site on my local machine, with no problems, I uploaded it to my live server. As I was browsing the live site (after about 5 page requests) I got a Drupal "site off-line" page saying:
The site is currently not available due to technical problems. Please try again later. Thank you for your understanding.
.....
The mysql error was: User [my_db_username] already has more than 'max_user_connections' active connections.
I waited a few minutes, and the site came back.
At first I contacted my hosting provider (I'm on a "Linux Power Plan" shared service at CWIhosting.com) and they asked my to describe steps they could take to reproduce the problem. JUST browsing was enough for me, but not for anyone else to reproduce the problem, so I didn't know what to say. In searching the Drupal site for similar issues, I found a suggestion to look in phpinfo() for certain MySQL settings.
The MySQL settings on my live server are:
mysql.allow_persistent Off Off
mysql.connect_timeout 60 60
mysql.max_links Unlimited Unlimited
mysql.max_persistent 0 0
After setting the same directives (via php.ini) on my local server, I could not get the problem duplicated on my local machine (I still don't know why ... ), so I set out to dig deeper. Seeing as this was ALSO limited to my (user 1) account, I started to investigate which permission might be triggering it. When I found the pathauto connection, I also saw (in the module code) that notify of path changes permission was checked alongside with the verbose setting. As soon as I selected the Verbose option in my pathauto settings (which had been unselected) the problem ceased. I can browse my website hindered.
Workaround:
I have no idea what causes this bug, or even where else to continue my investigations. I'm willing to help troubleshoot more, if I can get some direction. But for now, at least I have a workaround. Keep Verbose option selected, in pathauto preferences !!
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | page_not_found_errors.jpg | 65.64 KB | Eduart |
Comments
Comment #1
manimejia commentedComment #2
manimejia commentedupdate:
In reviewing the log entries from the Statistics module at admin/reports/dblog I found a lot of "page not found" errors, due to a CSS file trying to load images that are not there. This was happening a few times for EVERY page request on the site. Granted I am the ONLY person loading pages (a new site in testing phase), but I thought I'd like to clear this up, and see if that helped my situation.
It has helped so far.
I am able to browse the live site as User 1, with Verbose option unselected in pathauto settings. So that's what I know.
Comment #3
gregglesNobody else has ever reported this as a bug in Pathauto so I just can't believe that this was truly caused by Pathauto alone.
Comment #5
Anonymous (not verified) commentedI am also getting this same bug with my site hosted by Lunarpages. Once I regain access to my Drupal install, I will try the workaround and update this thread.
Comment #6
gregglesSounds good.
Comment #7
Anonymous (not verified) commentedOnce I had regained access, I checked the keep verbose option and so far, things seem to be fine. My number of anonymous users oscillates from < 5 to around 40 but hasn't jumped above since implementing the workaround a few hours ago. I'll keep my fingers crossed that it stays cool and doesn't continue to overload Lunarpages server as before.
I'll send an update in a day or so, once I hear back from my ISP with the daily summary of CPU, MEM & SQL percentages.
Comment #8
gregglesUntil there's a set of simplified steps to repeat the bug we should keep the status as "needs more info."
Comment #9
Anonymous (not verified) commentedAh, gotcha. Sorry about the status change. I really know very little about all of this and am just learning as I go.
My number of anonymous users has stayed low and seems to be stabilized. Although my CPU has spiked, the rest are within range:
%CPU - 1.84
%Memory - 0.12
mySQL - 0.0
So things seem to be fine.
Comment #10
dave reidWe still don't know about how to repeat the bug (or you possibly cross-posted), so marking this back to needs more info. :)
Comment #11
dave reidMarking as fixed due to lack of feedback.
Comment #13
Eduart commentedI found the same problem.
My drupal (6.x) site report this message:
The mysql error was: User db1 has already more than 'max_user_connections' active connections.
I do the same of #2 and i found the same problem, at admin/reports/dblog
I found a lot of "page not found" errors, (see the image attach.)