Am getting:

Warning: Got a packet bigger than 'max_allowed_packet' bytes query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:1548521:\"Got a packet bigger than 'max_allowed_packet' bytes\nquery: UPDATE cache_menu SET data = 'a:975:{s:4:\\"node\\";a:26:{s:5:\\"title\\";s:7:\\"Content\\";s:13:\\"page callback\\";s:17:\\"node_page_default\\";s:16:\\"access arguments\\";a:1:{i:0;s:14:\\"access content\\";}s:4:\\"type\\";i:4;s:6:\\"module\\";s:4:\\"node\\";s:14:\\"load_functions\\";s:0:\\"\\";s:16:\\"to_arg_functions\\";s in /usr/home/hoslo/public_html/includes/database.mysql.inc on line 128

when creating or updating content. I know it is probably a mod....possibly simplenews

CommentFileSizeAuthor
#9 max_alow.jpg279.05 KBvip_sa

Comments

kenorb’s picture

Status: Active » Fixed

Increase your max_allowed_packet variable in mysql configuration file.
http://drupal.org/node/317775

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

francewhoa’s picture

The following worked for me on Ubuntu 8.04.x LTS desktop edition http://drupal.org/node/541396

kenorb’s picture

On shared hosting you may try: http://drupal.org/project/drupal_tweaks
to increase max_allowed_packet variable on the fly

deshilachado’s picture

Version: 6.8 » 6.9
Status: Closed (fixed) » Active

I run into the same problem when importing images with image_import. I have successfully uploaded some images, but if I go to
http://example.com/admin/content/image_import
and try to import one small image (600x800 / 40kB) from the list I get an error like

Warning: Got a packet bigger than 'max_allowed_packet' bytes query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:1535406:\"Got a packet bigger than 'max_allowed_packet' bytes\nquery: UPDATE batch SET token = '2341a5a9221871ac8e8ee628da8f0abe', batch = 'a:10:{s:4:\\"sets\\";a:1:{i:0;a:11:{s:7:\\"sandbox\\";a:0:{}s:7:\\"results\\";a:0:{}s:7:\\"success\\";b:0;s:5:\\"title\\";s:20:\\"Bild wird importiert\\";s:16:\\"progress_message\\";s:29:\\"Importing @current of @total.\\";s:10:\\"operations\\";a:1:{i:0;a:2:{i:0;s:22:\\"_image_import_batch_op\\&qu in /kunden/229719_22926/webseiten/drupal/includes/database.mysql.inc  on line 128

Warning: Got a packet bigger than 'max_allowed_packet' bytes query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:1915345:\"Got a packet bigger than 'max_allowed_packet' bytes\nquery: UPDATE sessions SET uid = 1, cache = 1263726427, hostname = '92.226.33.195', session = 'updates_remaining|a:0:{}dblog_overview_filter|a:0:{}messages|a:1:{s:5:\\"error\\";a:1:{i:0;s:1535493:\\"user warning: Got a packet bigger than 'max_allowed_packet' bytes\\nquery: UPDATE batch SET token = '2341a5a9221871ac8e8ee628da8f0abe', batch = 'a:10:{s:4:\\\\"sets\\\\";a:1:{i:0;a:11:{s:7:\\\\"sandbox\\\\"; in /kunden/229719_22926/webseiten/drupal/includes/database.mysql.inc on line 128

In #570678: add docs for troubleshooting large imports it was stated that this is a Drupal issue, not an image_import issue.

PHP settings are
memory_limit=128M
upload_max_filesize = 16M
post_max_size = 8M

and MySQL settings are
max_allowed_packet=1*1024*1024

As I am on shared hosting (domaingo.de), I cannot change the MySQL settings and as this probably applies to many users I think the import should also work with MySQL default settings, which are max_allowed_Packet=1M. Shouldn't the batch API be capable to split this up into MySQL several smaller commands?

I have spent quite some time reading in the forums & googleing around and I tried almost all solutions proposed, but none could solve my problem.

I also tried the mini module described here: http://drupal.org/node/379976
which as I understand does the same as the Drupal tweaks module.
According to http://example.com/admin/help/max_packet the max_allowed_packet was increased (for each session respectively) to 16M, but the error persists.

The error logged in the dblog report (http://example.com/admin/reports/dblog) is a bit different:

Cannot modify header information - headers already sent by (output started at /kunden/229719_22926/webseiten/drupal/includes/database.mysql.inc:128)  in /kunden/229719_22926/webseiten/drupal/includes/common.inc in Zeile 335.

Any ideas what else I could try? Thanks

damien tournoud’s picture

Category: bug » support
deshilachado’s picture

Version: 6.9 » 6.15
Issue tags: +max_allowed_packet
deshilachado’s picture

ok, i just found
#434032: Batch update fails with access denied message comment #41/42
#629794: Scaling issues with batch API

looks like this a bad desing of batch API that should be changed
as a workaround, drupal tweaks or the max_allowed_packet mini-module try to increase the max_allowed_packet per session (apparenty succesfull), but for some reason this does not resolve my problem

vip_sa’s picture

Priority: Normal » Major
StatusFileSize
new279.05 KB

I have a dedicated server and I have increased the max_allowed_packet to 32M but still my whole site is in shambles. How do I get it back? Please can someone help me and tell me how can I check on the server what the setting currently is as well as how to fix this please.

Nevermind I got it fixed!!!!!

EvanDonovan’s picture

Status: Active » Fixed

Marking as fixed since you say that you got it fixed.

borngunners’s picture

How did you get it fix. I am having the same issue right now.... Your help will be greatly appreciated

apotek’s picture

The fact that Drupal requires a 32mb packet size for basic things like menu items, especially considering the platform was originally intended to work on shared hosting, economy plans, is bad architecture, bad design.

That said, the answer is, as has been noted above, that MySQL's max packet allowed setting needs to be set. If you can't change it in your application, you may simply need to reduce the amount of modules/url-aliases, and other cruft in your system, until Drupal can begin caching the menu system again.

vip_sa’s picture

You need access to your server or you should ask your server guys to increase the max_allowed_packet to something like 32M

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

shyamprakash’s picture

Increase your max_packet_size in my.cnf and restart your mysql server after making the change. Make max_packet_size to be 32 or 64 or 128M or More as per your requirement.

shyamprakash’s picture

SET GLOBAL max_allowed_packet=32M or more; and do enjoy ha ha. You can check your current configuration "mysqladmin variables | grep packet." command,

The reason why we experienced that error is because we originally had the max_allowed_packet set 32M temporarily and we rebooted our server so it returned to the default value.

poorva’s picture

I have raised the max_allowed_packet size up to 50M,
But still i m facing this error during cron run.

poorva’s picture

Status: Closed (fixed) » Needs review
EvanDonovan’s picture

Status: Needs review » Postponed (maintainer needs more info)

Can you list the modules that you are running? I would suspect that the problem is caused by a module that is misbehaving.

In any case, the "needs review" status is only intended to be used for patches needing review.

poorva’s picture

Status: Postponed (maintainer needs more info) » Fixed

I have resolved my problem. I think the main problem was due to currency module. It insert a lots of messages in watchdog.
That was occurring an error.

Status: Fixed » Closed (fixed)
Issue tags: -max_allowed_packet

Automatically closed -- issue fixed for 2 weeks with no activity.