Jump to content

Error: MySQL server has gone away [2006]


kjtocool

Recommended Posts

Hey guys,

 

I'm at my wits end here, and I really don't know what else to do.  I operate my own dedicated server and a few sites on it, one site has a phpbb forum, and the forum is encountering issues.  The error comes when trying to insert / update records:

 

SQL ERROR [ mysqli ]

 

MySQL server has gone away [2006]

 

SQL

 

SELECT topic_type, forum_id FROM phpbb_topics WHERE topic_id = 0

 

BACKTRACE

 

FILE: includes/db/mysqli.php

LINE: 143

CALL: dbal->sql_error()

 

FILE: posting.php

LINE: 871

CALL: dbal_mysqli->sql_query()

 

The server is managed by me, and my host won't help.  The only way they will take a look at it is if I pony up $300 for to switch to a managed server.  I've restarted, I've upgraded, I've restarted services, I've repaired the database, I've optimized the database, but no avail.

 

The only other thing I can think of is increasing the max_packet_size, but I don't know how to do it.  It requires to run something from the command prompt, and I have no experience with that, nor do I know how to do it.  (If anyone wants to walk me through it, I'd be grateful)  I only have experience within WHM.

 

When I try and manually insert, I get the following:

 

You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit.

 

Which reaffirms the idea that the max_packet_size is an issue.  The thing I simply don't get is that I'm only trying to run: insert into phpbb_bots values(1, 1, 't', 1, 't', 't'), so how is this running into a size issue?!

Link to comment
Share on other sites

I just tried the following:

 

SET GLOBAL max_allowed_packet=1000000000; insert into phpbb_bots values(1, 1, 't', 1, 't', 't');

 

Doing that allowed the statement to execute, but trying to do it without the first statement still doesn't work.  It looks like that's my problem, I just don't know how to fix it.  Anyone care to give me an idiots guide on how to do this?

Link to comment
Share on other sites

With notepad or something.  (Or vi or vim or something if you're under linux.)

 

 

If you're running Windows, which I'm guessing you're not if you have WHM, it will be wherever MySQL is installed.

 

If not, then it could be many places.

Link to comment
Share on other sites

Yeah, not running windows, or I would know how to do this.  My issue is, I have no idea how to get to the file.  There is no access through WHM, I know no other way into the server's files, and I can't connect with the root account via FTP to do it that way.

 

Thus, I'm left sitting here like an idiot, knowing something simple would fix my issue and no idea how to do it.  So frustrating, I hate not knowing how to do things that are so simple.

Link to comment
Share on other sites

I just ran the following: SHOW VARIABLES LIKE  'max_allowed_packet';  Which returned: max_allowed_packet  33554432

 

I then tried an insert directly from phpmyadmin, and it now works!  Unfortunately, the error still persists on the forum, and now I'm even more confused as to how to fix it.  I really appreciate anyone who helps out, I'm losing my mind over here.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.