Warning: Error while sending QUERY packet. PID=23009

“Warning: Error while sending QUERY packet. PID=23009”

Our pressbook installation was working perfectly fine as long as we had limited number of books(sites). But as we crossed more than 1000 sites, it started slowing down and occasionally throws following warning message

Warning: Error while sending QUERY packet. PID=23009 in /home/admin/web/public_html/wp-includes/wp-db.php](http://example.com/public_html/wp-includes/wp-db.php) on line 2024

We have also increased
max_allowed_packet 67108864

But this also not solved our problem.

Did anyone solved similar issue, appreciate if we could find fix to this problem.