Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
MySQL going away, Textpattern at fault?
I have spent more than a week dealing with a site hosted by GoDaddy (deluxe hosting plan, not the cheapest one). It seems the MySQL server is disconnecting (timing out?) on the main page of iaian7.com. I checked the processing time and it’s gone from 2.5-3 seconds (about four weeks ago) to over 120 seconds (a little more than a week ago).
The error codes look mostly like this:
tag_error <txp:comments/> -> Textpattern Warning: MySQL server has gone away
select *, unix_timestamp(posted) as time from tp1txp_discuss as txp_discuss where parentid=125 and visible=1 order by posted asc on line 84
GoDaddy has blamed the issue on using javascript (namely, google analytics), hosting sites (they claimed I couldn’t be using actual domains for secondary sites, though it’d already been working fine for many months, and I paid for the service to do just that), and now they say it’s “scripting issues” on my end.
I’ve tried all I can to accommodate GoDaddy’s (mostly preposterous) suggestions, but I just don’t know what to do about code that “needs to be optimized”. Four weeks ago I went through and redid my site setup to be more efficient (2.5-3 seconds server time, maybe not great, but it was working ok).
The basic overall setup is as follows…
Pages:
- Pages reference page pieces (forms), but still contain most of the DIV setup.
Forms:
- Header (contains site header information, from <head> to </head>)
- Title (this is different for various parts of the website, so I have about 3-4 title forms, <div id="title"> to </div>)
- Nav (I have two, one used by most of the site, another by a smaller section that needs a much smaller menu)
- Article (This is where things could get problematic, maybe… I’m using if_article_list and if_excerpt. But how is that too complex?) (one of my pages uses an if_article_list, but it’s specifying body-only or excerpt-only forms, not the more “complex” article post that makes use of if_article_list)
- Footer (I use if_article_list to change the next/previous links. I’m also linking to a google_analytics form that inserts the four lines of JS code, and an adsense form that inserts the advertising as well)
CSS:
- Base CSS file (global to the entire site, controls design and layout, I use the CSS tag n=“design”)
- Section CSS files (control images and colours, called on a per-section basis with the regular CSS tag)
Plugins:
nothing out of the ordinary; simple spam plugins, database backup, and my own plugins for handling images and such. I’ve disabled the database plugin, just to see if it could be the cause of troubles, and it’s not.
I know this might be a bit to ask of forum members, but I do need to know if this is… somehow… not a good setup. Should I post some of my actual code? Can you run into trouble using forms to build most of the page? Is Textpattern now off-limits for GoDaddy users? Is anyone else having this problem???
I’m planning on switching hosting, but want to make sure I’m doing everything I can to make a “clean” site. It’s no good to blame server issues on the host if I’ve inadvertently done something problematic myself. Thank you so much.
Last edited by iaian7 (2007-03-19 20:27:29)
VFX artist, photographer, designer, CG generalist, and hobbyist web developer
My TXP sites: blog | reels | portfolios
Offline
Re: MySQL going away, Textpattern at fault?
Switch your production status (admin->preferences) to testing or debugging and look at the number of queries and similar information which you can then see at the bottom of the HTML source of your pages.
2.5-3 seconds processing time is quite a lot, I think.
Offline
#3 2007-03-19 21:56:25
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: MySQL going away, Textpattern at fault?
Should I post some of my actual code?
Yes. If you change your production mode to Debugging, you’ll also get the tag trace. Post it here.
Offline
Re: MySQL going away, Textpattern at fault?
Page Template: (default, used on the “front page” of the site, and where all the errors occur)
<txp:output_form form=“page_head” />
<!— page container —>
<div id=“center”>
<div id=“container”>
<!— title and navigation —>
<txp:output_form form=“page_title” />
<div id=“nav”>
<txp:output_form form=“page_nav” />
</div>
<!— content —>
<div id=“content”>
<txp:article />
</div>
<!— footer —>
<txp:output_form form=“page_footer” />
</div>
</div>
<txp:output_form form=“google_analytics” />
</body>
</html>
Last edited by iaian7 (2007-03-20 04:39:48)
VFX artist, photographer, designer, CG generalist, and hobbyist web developer
My TXP sites: blog | reels | portfolios
Offline
Re: MySQL going away, Textpattern at fault?
Article Form: (default, used by the page template listed above)
<h3><txp:permlink><txp:title /></txp:permlink> <small><txp:posted />, <txp:an7_category1 /><txp:author /><txp:rss_article_edit> [edit]</txp:rss_article_edit></small></h3>
<txp:if_article_list>
<txp:if_excerpt>
<txp:excerpt />
<h4>
<txp:permlink>read more »</txp:permlink>
</h4>
<txp:else />
<txp:body />
<txp:comments/>
<txp:if_comments_allowed>
<h4><txp:comments_invite showalways=“1” /></h4>
</txp:if_comments_allowed>
</txp:if_excerpt>
<txp:else />
<txp:body />
<txp:comments/>
<txp:if_comments_allowed>
<h4><txp:comments_invite showalways=“1” /></h4>
</txp:if_comments_allowed>
</txp:if_article_list>
<br><br>
Last edited by iaian7 (2007-03-20 04:39:58)
VFX artist, photographer, designer, CG generalist, and hobbyist web developer
My TXP sites: blog | reels | portfolios
Offline
Re: MySQL going away, Textpattern at fault?
Foot Form: (page_footer used by the page template above)
<div id=“foot”>
<table width=“480” border=“0” cellspacing=“0” cellpadding=“0” align=“center” height=“56”>
<txp:if_article_list>
<tr align=“center” valign=“bottom” height=“24”>
<td width=“240” height=“24”><txp:older>« Older Posts</txp:older></td>
<td width=“240” height=“24”><txp:newer>Newer Posts »</txp:newer></td>
</tr>
<tr align=“center” valign=“top” height=“2”>
<td colspan=“2” height=“2”><img src=”/images/1_line_center.png”></td>
</tr>
<txp:else />
<tr align=“center” valign=“bottom” height=“24”>
<td width=“240” height=“24”><txp:link_to_prev>« <txp:prev_title /></txp:link_to_prev></td>
<td width=“240” height=“24”><txp:link_to_next><txp:next_title /> »</txp:link_to_next></td>
</tr>
<tr align=“center” valign=“top” height=“2”>
<td colspan=“2” height=“2”><img src=”/images/1_line_center.png”></td>
</tr>
</txp:if_article_list>
<tr align=“center” valign=“bottom” height=“80”>
<td colspan=“2” height=“80”>
<txp:output_form form=“adsense_footer” /></td>
</tr>
<tr align=“center” valign=“top” height=“2”>
<td colspan=“2” height=“2”>
<img src=”/images/1_line_center.png”></td>
</tr>
<tr align=“center” valign=“bottom” height=“30”>
<td colspan=“2” height=“30”>
<small><br>site and content ©2007 <a href=“http://iaian7.com/about/”>John Einselen</a><br>powered by <a href=“http://textpattern.com”>Textpattern</a> and <a href=“http://www.feedburner.com”>FeedBurner</a><br><br></small></td>
</tr>
</table>
</div>
VFX artist, photographer, designer, CG generalist, and hobbyist web developer
My TXP sites: blog | reels | portfolios
Offline
Re: MySQL going away, Textpattern at fault?
Thank you both for quick replies. Yeah, I can’t say I’m thrilled about 2.5-3 second server times… but it was a heck of a lot better than the current two minutes or more!
I’m just guessing at what forms to post, so I picked the three most likely culprits (everything else is really basic). Let me know if I should post others.
The following plugins are enabled: (a few others are installed, just not turned on)
ajw_favatar
an7_audio
an7_category
an7_img
hak_textile_tags
mrw_spamkeywords_urlcount
rss_admin_db_manager
rss_article_edit
zen_contact
Here’s the debugging mode output: (keep in mind that these errors may not be consistent; last week I was able to load the page once or twice without any errors. randomly.)
tag_error <txp:comments/> -> Textpattern Warning: Lost connection to MySQL server during query
select *, unix_timestamp(posted) as time from tp1txp_discuss as txp_discuss where parentid=126 and visible=1 order by posted asc
textpattern/lib/txplib_db.php:222 startrows() on line 84
textpattern/lib/txplib_db.php:84 trigger_error()
textpattern/lib/txplib_db.php:284 safe_query()
textpattern/lib/txplib_db.php:222 startrows()
textpattern/publish/taghandlers.php:1517 safe_rows_start()
textpattern/publish.php:958 comments()
processtags()
textpattern/publish.php:917 preg_replace_callback()
textpattern/publish/taghandlers.php:2586 parse()
textpattern/publish.php:958 if_excerpt()
processtags()
tag_error <txp:comments/> -> Textpattern Warning: MySQL server has gone away
select *, unix_timestamp(posted) as time from tp1txp_discuss as txp_discuss where parentid=123 and visible=1 order by posted asc
textpattern/lib/txplib_db.php:222 startrows() on line 84
textpattern/lib/txplib_db.php:84 trigger_error()
textpattern/lib/txplib_db.php:284 safe_query()
textpattern/lib/txplib_db.php:222 startrows()
textpattern/publish/taghandlers.php:1517 safe_rows_start()
textpattern/publish.php:958 comments()
processtags()
textpattern/publish.php:917 preg_replace_callback()
textpattern/publish/taghandlers.php:2586 parse()
textpattern/publish.php:958 if_excerpt()
processtags()
tag_error <txp:comments/> -> Textpattern Warning: MySQL server has gone away
select *, unix_timestamp(posted) as time from tp1txp_discuss as txp_discuss where parentid=125 and visible=1 order by posted asc
textpattern/lib/txplib_db.php:222 startrows() on line 84
textpattern/lib/txplib_db.php:84 trigger_error()
textpattern/lib/txplib_db.php:284 safe_query()
textpattern/lib/txplib_db.php:222 startrows()
textpattern/publish/taghandlers.php:1517 safe_rows_start()
textpattern/publish.php:958 comments()
processtags()
textpattern/publish.php:917 preg_replace_callback()
textpattern/publish/taghandlers.php:2586 parse()
textpattern/publish.php:958 if_excerpt()
processtags()
tag_error <txp:comments/> -> Textpattern Warning: MySQL server has gone away
select *, unix_timestamp(posted) as time from tp1txp_discuss as txp_discuss where parentid=120 and visible=1 order by posted asc
textpattern/lib/txplib_db.php:222 startrows() on line 84
textpattern/lib/txplib_db.php:84 trigger_error()
textpattern/lib/txplib_db.php:284 safe_query()
textpattern/lib/txplib_db.php:222 startrows()
textpattern/publish/taghandlers.php:1517 safe_rows_start()
textpattern/publish.php:958 comments()
processtags()
textpattern/publish.php:917 preg_replace_callback()
textpattern/publish/taghandlers.php:2586 parse()
textpattern/publish.php:958 if_excerpt()
processtags()
tag_error <txp:comments/> -> Textpattern Warning: MySQL server has gone away
select *, unix_timestamp(posted) as time from tp1txp_discuss as txp_discuss where parentid=118 and visible=1 order by posted asc
textpattern/lib/txplib_db.php:222 startrows() on line 84
textpattern/lib/txplib_db.php:84 trigger_error()
textpattern/lib/txplib_db.php:284 safe_query()
textpattern/lib/txplib_db.php:222 startrows()
textpattern/publish/taghandlers.php:1517 safe_rows_start()
textpattern/publish.php:958 comments()
processtags()
textpattern/publish.php:917 preg_replace_callback()
textpattern/publish/taghandlers.php:2586 parse()
textpattern/publish.php:958 if_excerpt()
processtags()
tag_error <txp:output_form form=“page_footer” /> -> Textpattern Warning: MySQL server has gone away
select Form from tp1txp_form as txp_form where name=‘page_footer’
textpattern/lib/txplib_db.php:199 getrow() on line 84
textpattern/lib/txplib_db.php:84 trigger_error()
textpattern/lib/txplib_db.php:260 safe_query()
textpattern/lib/txplib_db.php:199 getrow()
textpattern/lib/txplib_misc.php:1330 safe_row()
textpattern/publish/taghandlers.php:277 fetch_form()
textpattern/publish.php:958 output_form()
processtags()
textpattern/publish.php:917 preg_replace_callback()
textpattern/publish.php:453 parse()
index.php:34 textpattern()
tag_error <txp:output_form form=“page_footer” /> -> Textpattern Notice: form_not_found: page_footer on line 1332
textpattern/lib/txplib_misc.php:1332 trigger_error()
textpattern/publish/taghandlers.php:277 fetch_form()
textpattern/publish.php:958 output_form()
processtags()
textpattern/publish.php:917 preg_replace_callback()
textpattern/publish.php:453 parse()
index.php:34 textpattern()
tag_error <txp:output_form form=“google_analytics” /> -> Textpattern Warning: MySQL server has gone away
select Form from tp1txp_form as txp_form where name=‘google_analytics’
textpattern/lib/txplib_db.php:199 getrow() on line 84
textpattern/lib/txplib_db.php:84 trigger_error()
textpattern/lib/txplib_db.php:260 safe_query()
textpattern/lib/txplib_db.php:199 getrow()
textpattern/lib/txplib_misc.php:1330 safe_row()
textpattern/publish/taghandlers.php:277 fetch_form()
textpattern/publish.php:958 output_form()
processtags()
textpattern/publish.php:917 preg_replace_callback()
textpattern/publish.php:453 parse()
index.php:34 textpattern()
tag_error <txp:output_form form=“google_analytics” /> -> Textpattern Notice: form_not_found: google_analytics on line 1332
textpattern/lib/txplib_misc.php:1332 trigger_error()
textpattern/publish/taghandlers.php:277 fetch_form()
textpattern/publish.php:958 output_form()
processtags()
textpattern/publish.php:917 preg_replace_callback()
textpattern/publish.php:453 parse()
index.php:34 textpattern()
After this code, the rest of the page is printed “normally” – albeit broken, and only partially there.
Last edited by iaian7 (2007-03-20 05:03:07)
VFX artist, photographer, designer, CG generalist, and hobbyist web developer
My TXP sites: blog | reels | portfolios
Offline
Re: MySQL going away, Textpattern at fault?
update – it appears the errors are consistent.
VFX artist, photographer, designer, CG generalist, and hobbyist web developer
My TXP sites: blog | reels | portfolios
Offline
#9 2007-03-20 22:06:44
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: MySQL going away, Textpattern at fault?
The FAQ has a page on performance issues. In debugging mode, the tag trace will show the time taken by each individual query.
My first guess would be that your MySQL server is on a different network to your web server.
Alex
Offline
Re: MySQL going away, Textpattern at fault?
Thanks so much! I stupidly hadn’t checked the FAQ for performance issues. Since the errors were entirely runtime based, I was able to narrow my search for problems by quite a bit.
Runtime errors were traced to a single plugin: ajw_favatar
A real pity, it’s a terrific alternative to the never-working Gravatar service.
So… without user icons in the comments, my site is up and running again. Runtime is down to 0.2, which is a heck of a lot better than even before the problems started en-masse. Does anyone know of aother gravatar alternatives? Or a better implementation of user favicons?
VFX artist, photographer, designer, CG generalist, and hobbyist web developer
My TXP sites: blog | reels | portfolios
Offline
#11 2007-03-20 23:58:24
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: MySQL going away, Textpattern at fault?
I don’t know about alternatives, but you might want to report this to the plugin author, so he can audit his plugin’s code.
Offline
Re: MySQL going away, Textpattern at fault?
I think he’s aware of it; the last mention of the plugin on his site describes the exact issues I’ve seen on my own site. He simply disabled it and quit using the plugin. Wish I’d known this before!!!
My website is running again, though it’s still slower than it should be (the FAQ claims it should be between 0.1 and 0.5 seconds server time… I’m running between 1.5 and 3.5 seconds).
Last edited by iaian7 (2007-03-21 13:38:21)
VFX artist, photographer, designer, CG generalist, and hobbyist web developer
My TXP sites: blog | reels | portfolios
Offline
Pages: 1