New User? Need help? Click here to register for free! Registering removes the advertisements.

Computer Cops
image image image image image image image image
Donations
If you found this site helpful, please donate to help keep it online
Don't want to use PayPal? Try our physical address
image
Prime Choice
· Head Lines
· Advisories (All)
· Dnld of the Week!
· CCSP News Ltrs
· Find a Cure!

· Ian T's (AR 24)
· Marcia's (CO8)
· Bill G's (CO12)
· Paul's (AR 5)
· Robin's (AR 2)

· Ian T's Archive
· Marcia's Archive
· Bill G's Archive
· Paul's Archive
· Robin's Archive
image
Security Central
· Home
· Wireless
· Bookmarks
· CLSID
· Columbia
· Community
· Downloads
· Encyclopedia
· Feedback (send)
· Forums
· Gallery
· Giveaways
· HijackThis
· Journal
· Members List
· My Downloads
· PremChat
· Premium
· Private Messages
· Proxomitron
· Quizz
· RegChat
· Reviews
· Google Search
· Sections
· Software
· Statistics
· Stories Archive
· Submit News
· Surveys
· Top
· Topics
· Web Links
· Your Account
image
CCSP Toolkit
· Email Virus Scan
· UDP Port Scanner
· TCP Port Scanner
· Trojan TCP Scan
· Reveal Your IP
· Algorithms
· Whois
· nmap port scanner
· IPs Banned [?]
image
Survey
How much can you give to keep Computer Cops online?

$10 up to $25 per year?
$25 up to $50 per year?
$10 up to $25 per month?
$25 up to $50 per month?
More than $50 per year?
More than $50 per month?
One time only?
Other (please comment)



Results
Polls

Votes: 1180
Comments: 21
image
Translate
English German French
Italian Portuguese Spanish
Chinese Greek Russian
image
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin   Your Favorite ForumsFavForums 

[FIXED]Mysql server gone away : phpbb forum search

 
Post new topic   Reply to topic       All -> FavForums -> Forum Software Packages
View previous topic :: View next topic  
Author Message
Paul

Admin
Admin



Joined: Feb 22, 2002
Posts: 5719
Location: USA

PostPosted: Tue Feb 24, 2004 9:52 pm    Post subject: Mysql server gone away : phpbb forum search
Reply with quote

Ever experience:

Quote:
Error searching "Your Forum Posts" again

Could not delete old search id sessions

DEBUG MODE

SQL Error : 2006 MySQL server has gone away etc


When using the phpbb search.php file? For instance, the new forum posts, or just a regular search? Well I have many times at http://computercops.biz.

I noticed that whenever the phpbb sessions tables was reaching 30,000 records, the above error was thrown.

Turns out, all those records were being checked against the search_result table for phpbb. This made a query sent to mysql that was very long, over 1MB to be precise.

Why does this matter?

By default, there is a query limit restriction set to 1MB. I increased it to 6MB and now the table is over 40,000 records for the sessions file. All searches are working just fine.

I quote the solution from mysql:

Quote:
You can also get these errors if you send a query to the server that is incorrect or too large. If mysqld gets a packet that is too large or out of order, it assumes that something has gone wrong with the client and closes the connection. If you need big queries (for example, if you are working with big BLOB columns), you can increase the query limit by starting mysqld with the -O max_allowed_packet=# option (default 1M). The extra memory is allocated on demand, so mysqld will allocate more memory only when you issue a big query or when mysqld must return a big result row!


Src: http://www.mysql.com/doc/en/Gone_away.html

Mind you, these are not BLOB columns. Due to the session management's use against the search_result table, the query is *SO LARGE* that it causes a mysql crash for the query.

Computer Cops gets over 140,000 hits daily with anywhere from 1500 to 2100 members on at any given time this past month. Hence, we are finding problems that are not so common.

I'm hoping this post will help those that need it in the days to come.

_________________
I love my wife.
Back to top
View users profile Send private message Send email Visit posters website
Paul

Admin
Admin



Joined: Feb 22, 2002
Posts: 5719
Location: USA

PostPosted: Tue Feb 24, 2004 9:53 pm    Post subject:
Reply with quote

[reposted from nukecops: http://nukecops.com/postp100721.html#100721 ]
Back to top
View users profile Send private message Send email Visit posters website
Display posts from previous:   
Post new topic   Reply to topic       All -> FavForums -> Forum Software Packages All times are GMT - 5 Hours
Page 1 of 1

 
 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB 2.0.8a © 2001 phpBB Group

Version 2.0.6 of PHP-Nuke Port by Tom Nitzschner © 2002 www.toms-home.com
Version 2.2 by Paul Laudanski © 2003-2004 Computer Cops