+3 votes
in CMS Tips by (1.0k points)

When I try to upload many photos at once using the upload utility of the "Gallery project" application, it does not upload all of them. For some of them, it gives "UNABLE_TO_LOCK_EXCEPTION" error.

The log file has the following information which does not give any clue to fix the issue. How can I fix it?

2020-07-26 21:21:55 +00:00 --- error: @todo UNABLE_TO_LOCK_EXCEPTION

#0 public_html/modules/gallery/libraries/ORM_MPTT.php(50): ORM_MPTT_Core->lock()

#1 public_html/modules/gallery/models/item.php(396): ORM_MPTT_Core->save()

#2 public_html/modules/gallery/controllers/uploader.php(192): Item_Model_Core->save()

#3 public_html/modules/gallery/controllers/uploader.php(62): Uploader_Controller->_add_item('4000', '...', 'Meenaskshi-Sark...')

#4 [internal function]: Uploader_Controller->add_photo('4000')

#5 public_html/system/core/Kohana.php(331): ReflectionMethod->invokeArgs(Object(Uploader_Controller), Array)

#6 public_html/system/core/Event.php(208): Kohana_Core::instance(NULL)

#7 public_html/application/Bootstrap.php(67): Event_Core::run('system.execute')

#8 public_html/index.php(123): require('...')

#9 {main}

1 Answer

0 votes
by (23.4k points)

It seems that your server does not allow you to upload many files simultaneously. There may be some simultaneous upload limitations on the server.

The quick fix for this error is as follows:

  • Log in as Admin.
  • Click Admin -> Settings -> Advanced.
  • Under Advanced settings, change the gallery simultaneous_upload_limit  to 1 and save. This way gallery will not try to upload more than 1 file at a time.

simultaneous_upload_limit in gallery project

...