Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Site stuck.... MySQL shows all SLEEP-ing processes
jackjitsu
✭✭
Just when I thought I had my new vanilla forum was nice and stable.... I go to the site and it just spins and doesnt respond in the browser.
So I check the server side.... log into mysql and do a show full processlist;
Every single query against the vanilla site looks like this:
| 8061438 | rvan | localhost | jjf | Sleep | 136 | | NULL | | 8061488 | rvan | localhost | jjf | Sleep | 153 | | NULL | | 8061820 | rvan | localhost | jjf | Sleep | 372 | | NULL
...
About 170 queries in SLEEP state. Not a single real query running.
DEADLOCK?
I checked the slow query log for any long Lock_time's, nope. Nothing even close to 1/10th of a second.
Only a few long queries over 5 seconds.
Im running MySQL 5.1.48 64bit on CentOS5.9
Anyone seen this before?
Needs ideas where to look.
0
Comments
Forgot to mention.... restarting MySQL clears up the problem.
Going to try switching PDO persistence back to false... I soooo hate intermittent issue... the worst!!!
Disabling the PDO persistence sounds like it would fix it.
Also, this can happen when PHP processes run for too long if you use PHP-FPM. If you use PHP-FPM, have a look at the "pm" settings in the PHP-FPM config.
Add Pages to Vanilla with the Basic Pages app
I dont use PHP-FPM, I use my own script which pre-spawns the max php processes I allow. I dont trust dynamic managers like PHP-FPM, have had issues in the past.
Each process is set to recycle every 500 requests too.
None of my phpbb forums have hung like this, but they dont run in persistent mode either. So I guess ill compare apples to apples.
I setup a monitor to test the site once per minute and text my phone if it hangs again so I can catch it in the act... IF it happens again.
Happened twice tonight.
I'm no expert of db but I have read the persistence mode has some flaws to do with how it is managed.
grep is your friend.
HOLY FALSE CORRELATION BATMAN....
It happened again.... checked the DB... no sleeping processes.
Hmmmm.....
Then I noticed the webpage was still spinning.... it was blank/white... BUT the title had changed! So I know some of it was loaded. I viewed the page source of the blank/white page and lo and behold, all the HMTL is there, its just not rendering at all!
So, pretty sure this has nothing to do with the database at all. Maybe the custom theme, but I suspect one of the javascript plugins I use for other services.
The process of elimination beings now.... ugh
Try turning off javascript then.
grep is your friend.
[] make an exact copy of your website and place it on your localhost computer
[] check your firefox / chrome logs for any processes that are going on. Check your Apache error logs
[] turn off output buffering on your localhost and turn on the Apache error reporting to E_ALL
[] see if you have the same problems with the default theme
There was an error rendering this rich post.
Its a chrome quirk. If I pull up firefox while chrome is doing this, it works fine.
If I dump the chrome cache and reload, it works fine again.
Once in a while, my chrome does this. I may need to do a clean install of chrome before I try other stuff.