Hi all. I’ve recently moved a site over to VPS (hosted with ixWebhosing). It has been a massive learning experience. It was all working well for a couple days, however since around 2 days ago the sites have been loading extremely slowly (see sweetmma.com and sweetboxing.com). Around the net I found a lot of people saying this happens when you use up all of your resources - or something like that - and an indication of this would be if ‘swap’ memory is being used. From what I can tell swap memory is not being used (I don’t know what swap memory is, but using the ‘top’ command I’ve never seen anything but zeros for the swap fields). So I contacted by host and they replied with this:
Please accept our apologies for this delay. Yes, we have found the issue reason. There are a lot of locked MySQL queries on your VPS like these ones:
| 3489507 | soumitra_wiki | localhost | soumitra_wikidb | Query | 938 | Locked | UPDATE /* 146.0.73.219 */ `wiki_page` S
ET page_counter = page_counter + 1 WHERE page_id = 1 |
| 3489901 | soumitra_wiki | localhost | soumitra_wikidb | Query | 877 | Locked | SELECT /* LinkBatch::doQuery 207.46.13.9
8 */ page_id, page_namespace, page_title FROM `wiki_page` WH |
| 3490114 | soumitra_wiki | localhost | soumitra_wikidb | Query | 837 | Locked | SELECT /* LinkBatch::doQuery 207.46.199.
46 */ page_id, page_namespace, page_title FROM `wiki_page` W |
| 3490169 | soumitra_wiki | localhost | soumitra_wikidb | Query | 828 | Locked | SELECT /* LinkBatch::doQuery 207.46.199.
46 */ page_id, page_namespace, page_title FROM `wiki_page` W |
| 3490180 | soumitra_wiki | localhost | soumitra_wikidb | Query | 825 | Locked | SELECT /* LinkBatch::doQuery 157.55.16.2
19 */ page_id, page_namespace, page_title FROM `wiki_page` W |
| 3490443 | soumitra_wiki | localhost | soumitra_wikidb | Query | 775 | Locked | SELECT /* LinkBatch::doQuery 65.52.109.2
6 */ page_id, page_namespace, page_title FROM `wiki_page` WH |
| 3490479 | soumitra_wiki | localhost | soumitra_wikidb | Query | 770 | Locked | SELECT /* LinkBatch::doQuery 207.46.199.
46 */ page_id, page_namespace, page_title FROM `wiki_page` W |
| 3490619 | soumitra_wiki | localhost | soumitra_wikidb | Query | 738 | Locked | SELECT /* LinkBatch::doQuery 207.46.199.
46 */ page_id, page_namespace, page_title FROM `wiki_page` W |
| 3491213 | soumitra_wiki | localhost | soumitra_wikidb | Query | 626 | Locked | SELECT /* LinkBatch::doQuery 157.55.16.2
19 */ page_id, page_namespace, page_title FROM `wiki_page` W |
Please recheck and fix your application code.
Now, I’ve check in mysql, we have no username soumitra_wiki and no database soumitra_wikidb. Further, when I run ‘show processlist;’ (and I have many times) I’ve never seen one of these locked queries, although, there is one process which is bothering me:
| 19003 | root | localhost | NULL | Sleep | 3424 | | NULL
It has been sleeping for a long time (the wait_timeout variable is 28800 seconds though - should I change this?).
Anyway, I’m an absolute wreck here, this past month has been horrible for the sites - ix ‘disabled’ our site on shared hosting because it was using up too many resources (that was a week of down time). Then there were a couple hicups while moving to VPS (this is my first time working with VPS, and first time with a Linux OS also). And now this is happening.
Any help/guidance anyone could offer me would be greatly appreciated.
Thanks in advance,
Nick.