Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-06-11 11:41:53

Boby Dimitrov
Member
From: Sofia, Bulgaria
Registered: 2004-09-27
Posts: 76
Website

[resolved] MySQL server has gone away

OK, a bit of background. Some time ago my post pages started rendering incompletely. I wrote about it here and received some pointers:
http://forum.textpattern.com/viewtopic.php?id=30898

The tag mistake, resolved in that topic, however, seems to have no relation to the problem. The problem is that some queries take very long time to complete, thus the timeouts.

For example, the home page of my blog renders in very short time:
<!— Runtime: 0.5317 —>
<!— Query time: 0.008386 —>
<!— Queries: 18 —>

While a post page with a few comments takes forever:
<!— Runtime: 15.829 —>
<!— Query time: 0.005621 —>
<!— Queries: 30 —>

Once it passes the 15 seconds, the MySQL server times out, as that’s a limit set by the host. The problem is not the limit, but TXP queries taking a long time. When MySQL “goes away”, the pages is being shown not completely rendered. Usually the comment form is missing, and the footer, sometimes even the comments.

I’ve talked with my host and I’m monitoring the server load – that’s not an issue.

I’ve enabled the Debugging mode and I’m looking at the tag trace and I’m wondering what those SQL numbers mean:
[SQL (7.79628753662E-5): select *, unix_timestamp(posted) as time from txp_txp_discuss as txp_discuss where parentid=458 and visible=1 order by posted ASC ]

I hope those are not seconds? I’ve run this query via SSH, directly in the MySQL console, and it completes in 0.01 s (and I assume it’s even faster).

I can post the whole tag trace, but it’s huge… Is there any way to diagnose which queries take the longest time or which ones stall the parsing?

Thanks in advance!

Offline

#2 2009-06-11 12:11:34

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: [resolved] MySQL server has gone away

Hi Boby

Can you check here?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2009-06-11 12:36:04

Boby Dimitrov
Member
From: Sofia, Bulgaria
Registered: 2004-09-27
Posts: 76
Website

Re: [resolved] MySQL server has gone away

OK, first look at that solution – it works. Post page runtime down to 0.4 sec, pages render fully. This could be the one. Comment preview now possible (although a bit slower than usual, but anyway) and comment posting too.

I’ll keep you posted in case the problem re-appears.

Thanks!

ps: On a side note, it always amazes me how simple the solutions of seemingly complicated problems can be!

Last edited by Boby Dimitrov (2009-06-11 12:40:05)

Offline

Board footer

Powered by FluxBB