Warning: MySQL server has gone away 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:3267130:\"MySQL server has gone away\nquery: UPDATE batch SET token = '00845efd9d6086519cf9fcd0963c9224', batch = 'a:11:{s:4:\\"sets\\";a:1:{i:0;a:10:{s:7:\\"sandbox\\";a:0:{}s:7:\\"results\\";a:0:{}s:7:\\"success\\";b:0;s:10:\\"operations\\";a:1:{i:0;a:2:{i:0;s:20:\\"image_upload_process\\";i:1;a:2:{i:0;a:23:{s:5:\\"#tree\\";b:1;i:210;a:18:{s:6:\\"remove\\";a:21:{s:5:\\"#type\\";s:8:\\"checkbox\\";s:14:\\"#default_value\\";N;s:5:\\"#post\\";a:6: in C:\xampp\htdocs\D6\includes\database.mysqli.inc on line 128

Warning: MySQL server has gone away 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:426:\"MySQL server has gone away\nquery: UPDATE sessions SET uid = 1, cache = 0, hostname = '127.0.0.1', session = 'language|s:2:\\"de\\";updates_remaining|a:0:{}dblog_overview_filter|a:0:{}node_overview_filter|a:1:{i:0;a:2:{i:0;s:4:\\"type\\";i:1;s:18:\\"node_gallery_image\\";}}user_overview_filter|a:0:{}', timestamp = 1244567116 WHERE sid = '6b5bfd4a1420dcc3fe433ae3283e1f8a'\";s:5:\"%file\";s:39:\"C:\\xampp\\htdocs\\D6\\includes\\session.inc\";s:5:\"%line\";i:68;}', 3, '', 'http://localhost/D6/en/node/202/edit/images?desti in C:\xampp\htdocs\D6\includes\database.mysqli.inc on line 128

Warning: MySQL server has gone away 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:7:\"warning\";s:8:\"%message\";s:130:\"Cannot modify header information - headers already sent by (output started at C:\\xampp\\htdocs\\D6\\includes\\database.mysqli.inc:128)\";s:5:\"%file\";s:38:\"C:\\xampp\\htdocs\\D6\\includes\\common.inc\";s:5:\"%line\";i:328;}', 3, '', 'http://localhost/D6/en/node/202/edit/images?destination=node/202', 'http://localhost/D6/en/node/202/edit/images?destination=node/202', '127.0.0.1', 1244567116) in C:\xampp\htdocs\D6\includes\database.mysqli.inc on line 128

The gallery consists of 15 pics. Changes via "Manage Images" results in this message. Wether changing only one title or reordering 10 pics makes no difference so I think currently you are "cheating" with your process messages(#483046: Edit Images Optimization).
I guess this is also connected to:#473924: Pagination in node gallery
My memory limit is 128M.

Comments

seehawk’s picture

I'm also getting the following message when trying to delete an image from a larger gallery (over 10 images):

"Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 11335230 bytes) in I:\wamp\www\personal-site\includes\database.inc on line 213"

I figure it's all related, so I didn't make it a separate issue. If we need to break it out, I will.

wilson98’s picture

Version: 6.x-2.0-alpha9 » 6.x-2.0-alpha7

this is the mysql conf issue, check these setting:
1, set mysqli.reconnect = On in php.ini
2, set max_allowed_packet = 1M to a larger value such as 64M in my.cnf

seehawk’s picture

Even for the delete issue? Why does it take more memory to delete a single image from a gallery of 10 than it does from a gallery of 5?

wilson98’s picture

no, delete process is light, but upload or update process need much more memory because it needs to know the cck form information which is large.

seehawk’s picture

Ok, I'll break it out into it's own bug.

seehawk’s picture

Version: 6.x-2.0-alpha7 » 6.x-2.0-alpha9

Still unable to re-arrange images for galleries with more than 10 images. I get an access denied error.

I completely removed and uninstalled the module, along with the content types it created, in order to start with a clean install. Got the error with 128M memory limit, and still had the problem after upping the memory to 256M.

Tally’s picture

I have a gallery with 26 images. I moved two of the images by dragging the re-postitioning handle. When I saved, I got the following error on the Processing Images Edit page:

An error occurred. /batch?id=152&op=do { "status": true, "percentage": 100, "message": "Remaining 0 of 1.\x3cbr/\x3e\x26nbsp" } br /> b>Fatal error /b>: Out of memory (allocated 39059456) (tried to allocate 5325759 bytes) in b>/home/xxxx/public_html/SubDomain.pictest/includes/database.mysqli.inc /b> on line b>323 /b> br />

Note: the leading tag symbols wrtr deleted to show that the error message displayed the html tags in raw form.

I clicked the link to go to the error page and saw the gallery with the following message:

An error occurred while processing image_upload_process with arguments :image_upload_process

The images were moved, though. The gallery page showed the images in the order I selected.

PS: I am running drupal 6.12 with php ver. 5.2.5 with memory_limit set at 64MB.

wilson98’s picture

please use the dev version to test it, as in the newest version, the batch operation has been changed to improve the larger gallery operation performance.

seehawk’s picture

I downloaded and installed the June 20 dev build, and had the same problem, both with rearranging images and deleting images.

Tally’s picture

Version: 6.x-2.0-alpha7 » 6.x-2.0-alpha9

I too am using the June 20 developer version.

seehawk’s picture

I just got the same behavior on the June 21 dev version as well.

wilson98’s picture

ok, i firgured out why this happened. the batch use its own copy of $form and $form_state. when you're managing with 10 or more images, that form is very big (1168475 bytes or so), see line 426 in form.inc. I did a hack when submitting images management form, this should solve this issue, please test it using June 22 dev version. thanks!

Tally’s picture

I installed the June 22 dev version and re-ordered images in the manage images screen for a 26 image gallery. Success! There were no errors and the images were rearranged as expected.

Well done! I can imagine the difficulty in tracking down the cause of that issue. Thanks.

seehawk’s picture

Version: 6.x-2.0-alpha9 » 6.x-2.x-dev

Confirmed! I created a gallery of over 100 images and had no problems with re-arranging, deleting, moving single images to a different gallery, choosing a new cover image, or any combination thereof.

Great work! Thanks!

dddave’s picture

Status: Active » Fixed

Hooray!

Status: Fixed » Closed (fixed)

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