Error while sending QUERY packet

Hello awesome MainWP crew and community.

I’m not sure if I should ask this here, or if I should create a ticket. Please feel free to correct me :slight_smile:

Today I have a first. On a site that I maintain, I get this error:

Warning: Error while sending QUERY packet. PID=19861 in /www/htdocs/*****/wp-includes/wp-db.php on line 2030

The error disappears when I disable MainWP. Does anyone have any idea how to solve this?

1 Like

Hey @RickHeijster, thanks for your kind words.

I am not 100% sure, but I can assume what is going on. It appears that something is causing that warning, but the MainWP Child hides it. This would normally happen if you have the Security Issues fixed, PHP Error reporting to be specific.

Since it happens, when the Child Plugin is disabled, I think that the warning is produced by some other plugin, so it might be good to try to disable all other plugins one-by-one to see which one causes it. (if it’s not a plugin, it could be the theme or even WP Core problem).

Let us know how it goes.

Hi Bogdan,

It’s just the other way around:

The error appears when MainWP Child is active
The error does not appear when MainWP Child is disabled


Hi Rick, my apologies, I read it wrong.

I am not sure what could cause this problem. I have never seen it before.

Can you send me some basic info about the child site setup, WP and MainWP Child plugin version, PHP Version,…?

Sure. The site runs on PHP 7.0.33. WordPress and all MainWP plugins are up to date.

MainWP Child Version
WordPress 5.3.2

Hmm… after removing MainWP Child and MainWP Child Reports and reinstalling them, the error was gone.

Now MainWP disconnects while syncing though.

Can you try this MainWP Child plugin version and see if it works better?

@RickHeijster Are you still in need of assistance with this?

Sorry, real life came in the way.

Unfortunately it doesn’t solve the solution. And the error ‘Error while sending QUERY packet’ also returned.

When I disabled the MainWP Child Reporting plugin, the error about the Query packet disappeared. However, the site still immediately disconnects on sync.

Hey @RickHeijster, thanks for getting back to us.

I took some time to research this problem and I think I know what is going on. As per this article, the error that you get is related to the total number of database requests a website can make. Basically, the server is not ready to send any further database requests.

Are you able to reach out to the host support and see if they are aware of any server-side limitation that could cause this?

If I found right, it could be the max_allowed_packet setting that needs to be increased.

1 Like

Hi @bogdan.

I deleted the MainWP Reports plugin (for the time being) and the error about the Query packets didn’t appear anymore.

The issue with the site disconnecting on sync didn’t go away, though:

  1. Site disconnects on sycn
  2. On reconnect, I get the error ‘Public key already set. Please deactivate & reactivate the MainWP Child plugin and try again.’
  3. I deactivate and reactivate, and successfully reconnect
  4. I try to sync → back to step 1.

Perhaps this issue is more suitable for a ticket?

Thanks Rick for getting back to me.

Yes please, feel free to reach out to me via ticket so we can check this further.