phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Critical errors


 
Search this topic... | Search General Support... | Search Box
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Author Message
Oelita
Board Member



Joined: 09 Feb 2012

Posts: 11
Location: Paris


flag
PostPosted: Thu Feb 09, 2012 4:28 pm 
Post subject: Critical errors

Hello,
I'm glad I finally found this forum for phpbb2 refugees ! Not so easy to find you...
So, I own a phpbb2 forum which contains 800k posts, and has been modded several years ago (it was created in 2003... ). I wouldn't dare to change any big thing in my forum, and even less migrate it to v3 !

My problem is : for 2 years now, we occasionnally but increasingly see critical error messages accessing the mysql server, or other error messages telling the query was interrupted. We are on a shared server, and I guess it is a little "small" for us, but each time I contact my hosting service, they can't explain anything, and don't tell me to upgrade my server either. They just say "your queries are too heavy, optimize your code".

We periodically manually delete some posts (it is a lot of work not to risk to loose valuable or historical discussions). But I'm looking for ways to optimize our perf and loose less DB access. Can you direct me to some intesting points about this topic ?

Some years ago, I modded the search functions to index only the titles of the posts, and not the contents. It was mainly done to minimize the DB size.

Thanks,
Oelita
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Thu Feb 09, 2012 5:10 pm 
Post subject: Re: Critical errors

Oelita wrote:
but increasingly see critical error messages accessing the mysql server, or other error messages telling the query was interrupted. We are on a shared server, and I guess it is a little "small" for us, but each time I contact my hosting service, they can't explain anything, and don't tell me to upgrade my server either. They just say "your queries are too heavy, optimize your code".
Are these MySQL #2006 errors? Those are caused by taking too long between issuing queries.

Many web hosts will set a really short time-out value, such as 1 or 2 seconds, and if MySQL doesn't get another query in that time, it will close the connection.

One solution that your web host can implement is to increase the timeout, but they won't. They won't do it because they don't want too many connections to their mysqld.

One solution that you can implement is to modify the sql_db class to detect these timeout issues and open a mysql connection again.

_________________
Moof! Email me: dog_cow@macgui.com
Inside Allerton Park Lincoln's Tomb, Oak Ridge Cemetery, Springfield IL Mac 512K Blog
Back to top
Oelita
Board Member



Joined: 09 Feb 2012

Posts: 11
Location: Paris


flag
PostPosted: Thu Feb 09, 2012 5:48 pm 
Post subject: Re: Critical errors

Thanks, I didn't know about this type of error and limitation ! could you precise me what code to add to ask for reconnection in that case ?

In fact, for now, I usually don't have the details of the type of error, only a general "Critical error: impossible connection to the database server". Can you tell me how to display or log it easily ?

Here are some of the more specific messages we are getting some times (I can see a 2006 in it) :

phpBB : Critical Error
Could not query config information
DEBUG MODE
SQL Error : 1317 Query execution was interrupted
SELECT * FROM phpbb_config
Line : 216
File : common.php

DEBUG MODE
SQL Error : 1028 Sort aborted
SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time FROM phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_posts p2, phpbb_users u2 WHERE t.forum_id = 5 AND t.topic_poster = u.user_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id AND t.topic_type <> 2 ORDER BY t.topic_type DESC, t.topic_last_post_id DESC LIMIT 0, 50
Line : 328
File : viewforum.php
Could not obtain banlist

DEBUG MODE
SQL Error : 2006 MySQL server has gone away
SELECT ban_userid FROM phpbb_banlist
Line : 606
File : functions_post.php

message_die() was called multiple times. This isn't supposed to happen. Was message_die() used in page_tail.php

Could not obtain post/user information.
DEBUG MODE
SQL Error : 1317 Query execution was interrupted
SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid FROM phpbb_posts p, phpbb_users u, phpbb_posts_text pt WHERE p.topic_id = 50844 AND pt.post_id = p.post_id AND u.user_id = p.poster_id ORDER BY p.post_time ASC LIMIT 4740, 20
Line : 399
File : viewtopic.php

phpBB : Critical Error
Error doing DB query userdata row fetch
DEBUG MODE
SQL Error : 1317 Query execution was interrupted
SELECT u.*, s.* FROM phpbb_sessions s, phpbb_users u WHERE s.session_id = 'xxxxxxxxxxxx' AND u.user_id = s.session_user_id
Line : 311
File : sessions.php
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 653
Location: Texas


flag
PostPosted: Fri Feb 10, 2012 1:59 pm 
Post subject: Re: Critical errors

Getting the configuration (select * from phpbb_config) is about as light as a query gets in phpBB2. There should never be a problem running that query. Ditto on the sessions query. If you're experiencing query or database problems, I would have expected it to be on the search tables.

Your host might be able to give you a "slow queries" report. That would show you which queries from your board are running longer than others.

Frankly, it could just be a problem with the way the database is configured. That's not something you have any control over if you're on a shared host.

_________________
phpBBDoctor Blog
Back to top
Oelita
Board Member



Joined: 09 Feb 2012

Posts: 11
Location: Paris


flag
PostPosted: Fri Feb 10, 2012 4:27 pm 
Post subject: Re: Critical errors

You're right, the queries where we detect problems are not the ones which should.

My host doesn't help me a lot to find out why we have these problems. My last incident ticket was answered : "Use our new analysis tool" to see which script is in trouble.
But it doesn't help, it just says : "today at 14h55, viewtopic.php?t=49805 makes 6 update queries, maybe this is too much, and its longer query at this time is : SELECT * FROM phpbb_smilies" icon_rolleyes.gif

I had a technician from my host online on Twitter who looked at my problem, but he said it was weird, he applied a patch on the MySQL server, and then, nothing improved, and no more news icon_sad.gif
Back to top
Oelita
Board Member



Joined: 09 Feb 2012

Posts: 11
Location: Paris


flag
PostPosted: Fri Feb 10, 2012 4:41 pm 
Post subject: Re: Critical errors

I looked at the "wait_timeout" parameter on mysql, and it seens it is set to 60, so not so low, is it ? connect_timeout is set to 10.
Back to top
Oelita
Board Member



Joined: 09 Feb 2012

Posts: 11
Location: Paris


flag
PostPosted: Tue Feb 14, 2012 9:41 am 
Post subject: Re: Critical errors

I could reach a technician from my host via Twitter (such a great tool for that !), and I don't know what he changed, but it seems to be much better now ! icon_biggrin.gif

Someone alerted me about a problem with the search about one person (the "all the messages from a person" search). I'm opening a new topic about that.
Back to top
Citrix
Board Member



Joined: 19 Feb 2012

Posts: 42



PostPosted: Wed Feb 22, 2012 3:39 pm 
Post subject: Re: Critical errors

I learned over the years that web hosts do not help with errors.. Even if it turned out to be a php configuration issue.
As long as your site is loading, they are not really interested in your requests.
Back to top
Oelita
Board Member



Joined: 09 Feb 2012

Posts: 11
Location: Paris


flag
PostPosted: Wed Feb 22, 2012 3:42 pm 
Post subject: Re: Critical errors

I could reach someone via Twitter, and this tech person is really trying to help me now... A new server update will be made tonight, so let's hope that it will be successfull !
Back to top
Citrix
Board Member



Joined: 19 Feb 2012

Posts: 42



PostPosted: Wed Feb 22, 2012 3:49 pm 
Post subject: Re: Critical errors

Oelita wrote:
So, I own a phpbb2 forum which contains 800k posts, and has been modded several years ago (it was created in 2003... ). I wouldn't dare to change any big thing in my forum, and even less migrate it to v3 ! Oelita
Same issue with me. Plus I use wysiwyg for easy editing the posts. I could not switch back to bbcodes.
Back to top
Citrix
Board Member



Joined: 19 Feb 2012

Posts: 42



PostPosted: Wed Feb 22, 2012 3:54 pm 
Post subject: Re: Critical errors

Quote:
We are on a shared server, and I guess it is a little "small" for us, but each time I contact my hosting service, they can't explain anything, and don't tell me to upgrade my server either.
LOL.. I upgraded to a VPS account. It's expensive but I don't regret it. I have learned using ssh to write my own crons, install apache Mod to protect the sites, etc.. The web host can't do all that. It's amazing I ran the forum for 5 years on a shared account which gave me no access to installing anything (Mod_evasive, Mod_qos, hostdeny, etc, all that to fight of DDOS attacks and other means intrudings). The last attacks I faced the past 6 weeks were fierce. There is no way I could have survived on a shared server.
Back to top
Display posts from previous:   
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0123 seconds using 15 queries. (SQL 0.0014 Parse 0.0003 Other 0.0106)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo