|
Donations |
|
|
|
|
|
If you found this site helpful, please donate to help keep it online
Don't want to use PayPal? Try our physical address
|
|
|
Survey |
|
|
|
|
|
|
|
|
Translate |
|
|
|
|
|
|
|
|
|
|
View previous topic :: View next topic |
Author |
Message |
Paul
Admin
Joined: Feb 22, 2002
Posts: 5719
Location: USA
|
Posted: Tue Feb 24, 2004 9:52 pm Post subject: Mysql server gone away : phpbb forum search |
|
|
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 |
|
|
Paul
Admin
Joined: Feb 22, 2002
Posts: 5719
Location: USA
|
Posted: Tue Feb 24, 2004 9:53 pm Post subject: |
|
|
[reposted from nukecops: http://nukecops.com/postp100721.html#100721 ] |
|
Back to top |
|
|
|
|
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
|