Error uploading 3D model in JSON format

I’m following the 3D model upload test instructions in the IIIF Server module docs:

The thumb.jpg and thekiss.jpg files load file, but the thekiss.json file fails with this error in the logs:

Command "/usr/bin/convert '/tmp/omekabxMICQ[0]' -auto-orient -background white +repage -alpha remove -thumbnail '800x800>' '/tmp/omekaa68Kt0.jpg'" failed with status code 1.

I double checked the extension and mime types were added in the settings. ImageMagick is installed on the server (version 6.9.10-68 on Amazon Linux).

What else can I try? Thanks!

Does it actually fail, or just leave that message in the log?

I’m not the person to speak to IIIF Server or Archive Repertory issues, but that kind of ImageMagick message is expected on a file like JSON that doesn’t really have a thumbnail. It wouldn’t by itself indicate a problem.

Thanks for the quick response!

The file is definitely not uploading. Is there somewhere else I can check for details on why?

So, this file doesn’t show up in the list of media at all?

Is there an error reported in the interface? Or not?

Edit - enabled dev mode in .htaccess and see this:

Omeka S encountered an error
Doctrine\DBAL\Exception\DriverException
An exception occurred while executing 'SELECT s0_.id AS id_0, s0_.slug AS slug_1, s0_.theme AS theme_2, s0_.title AS title_3, s0_.summary AS summary_4, s0_.navigation AS navigation_5, s0_.item_pool AS item_pool_6, s0_.created AS created_7, s0_.modified AS modified_8, s0_.is_public AS is_public_9, s0_.assign_new_items AS assign_new_items_10, s0_.homepage_id AS homepage_id_11, s0_.owner_id AS owner_id_12 FROM site s0_ WHERE s0_.is_public = 1 GROUP BY s0_.id ORDER BY s0_.id ASC': SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

Details:

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:88
Stack trace:
#0 /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(88): PDO->query('SELECT s0_.id A...')
#1 /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(910): Doctrine\DBAL\Driver\PDOConnection->query('SELECT s0_.id A...')
#2 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php(50): Doctrine\DBAL\Connection->executeQuery('SELECT s0_.id A...', Array, Array, NULL)
#3 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(337): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array)
#4 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(992): Doctrine\ORM\Query->_doExecute()
#5 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(947): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(NULL, 1)
#6 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(750): Doctrine\ORM\AbstractQuery->execute(NULL, 1)
#7 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php(177): Doctrine\ORM\AbstractQuery->getResult(1)
#8 /var/app/current/application/src/Api/Adapter/AbstractEntityAdapter.php(299): Doctrine\ORM\Tools\Pagination\Paginator->getIterator()
#9 /var/app/current/application/src/Api/Manager.php(221): Omeka\Api\Adapter\AbstractEntityAdapter->search(Object(Omeka\Api\Request))
#10 /var/app/current/application/src/Api/Manager.php(59): Omeka\Api\Manager->execute(Object(Omeka\Api\Request))
#11 /var/app/current/modules/GoogleAnalytics/Module.php(189): Omeka\Api\Manager->search('sites', Array)
#12 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): GoogleAnalytics\Module->printScript(Object(Laminas\EventManager\Event))
#13 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(170): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\EventManager\Event))
#14 /var/app/current/application/src/View/Helper/Trigger.php(61): Laminas\EventManager\EventManager->triggerEvent(Object(Laminas\EventManager\Event))
#15 [internal function]: Omeka\View\Helper\Trigger->__invoke('view.layout')
#16 /var/app/current/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(396): call_user_func_array(Object(Omeka\View\Helper\Trigger), Array)
#17 /var/app/current/application/view/layout/layout.phtml(11): Laminas\View\Renderer\PhpRenderer->__call('trigger', Array)
#18 /var/app/current/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(505): include('/var/app/curren...')
#19 /var/app/current/index.php(36): Laminas\View\Renderer\PhpRenderer->render(NULL)
#20 {main}

Next Doctrine\DBAL\Driver\PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:90
Stack trace:
#0 /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(910): Doctrine\DBAL\Driver\PDOConnection->query('SELECT s0_.id A...')
#1 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php(50): Doctrine\DBAL\Connection->executeQuery('SELECT s0_.id A...', Array, Array, NULL)
#2 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(337): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array)
#3 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(992): Doctrine\ORM\Query->_doExecute()
#4 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(947): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(NULL, 1)
#5 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(750): Doctrine\ORM\AbstractQuery->execute(NULL, 1)
#6 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php(177): Doctrine\ORM\AbstractQuery->getResult(1)
#7 /var/app/current/application/src/Api/Adapter/AbstractEntityAdapter.php(299): Doctrine\ORM\Tools\Pagination\Paginator->getIterator()
#8 /var/app/current/application/src/Api/Manager.php(221): Omeka\Api\Adapter\AbstractEntityAdapter->search(Object(Omeka\Api\Request))
#9 /var/app/current/application/src/Api/Manager.php(59): Omeka\Api\Manager->execute(Object(Omeka\Api\Request))
#10 /var/app/current/modules/GoogleAnalytics/Module.php(189): Omeka\Api\Manager->search('sites', Array)
#11 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): GoogleAnalytics\Module->printScript(Object(Laminas\EventManager\Event))
#12 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(170): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\EventManager\Event))
#13 /var/app/current/application/src/View/Helper/Trigger.php(61): Laminas\EventManager\EventManager->triggerEvent(Object(Laminas\EventManager\Event))
#14 [internal function]: Omeka\View\Helper\Trigger->__invoke('view.layout')
#15 /var/app/current/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(396): call_user_func_array(Object(Omeka\View\Helper\Trigger), Array)
#16 /var/app/current/application/view/layout/layout.phtml(11): Laminas\View\Renderer\PhpRenderer->__call('trigger', Array)
#17 /var/app/current/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(505): include('/var/app/curren...')
#18 /var/app/current/index.php(36): Laminas\View\Renderer\PhpRenderer->render(NULL)
#19 {main}

Next Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'SELECT s0_.id AS id_0, s0_.slug AS slug_1, s0_.theme AS theme_2, s0_.title AS title_3, s0_.summary AS summary_4, s0_.navigation AS navigation_5, s0_.item_pool AS item_pool_6, s0_.created AS created_7, s0_.modified AS modified_8, s0_.is_public AS is_public_9, s0_.assign_new_items AS assign_new_items_10, s0_.homepage_id AS homepage_id_11, s0_.owner_id AS owner_id_12 FROM site s0_ WHERE s0_.is_public = 1 GROUP BY s0_.id ORDER BY s0_.id ASC':

SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:106
Stack trace:
#0 /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(169): Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))
#1 /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(145): Doctrine\DBAL\DBALException::wrapException(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'An exception oc...')
#2 /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(913): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'SELECT s0_.id A...', Array)
#3 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php(50): Doctrine\DBAL\Connection->executeQuery('SELECT s0_.id A...', Array, Array, NULL)
#4 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(337): Doctrine\ORM\Query\Exec\SingleSelectExecutor->execute(Object(Doctrine\DBAL\Connection), Array, Array)
#5 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(992): Doctrine\ORM\Query->_doExecute()
#6 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(947): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(NULL, 1)
#7 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(750): Doctrine\ORM\AbstractQuery->execute(NULL, 1)
#8 /var/app/current/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php(177): Doctrine\ORM\AbstractQuery->getResult(1)
#9 /var/app/current/application/src/Api/Adapter/AbstractEntityAdapter.php(299): Doctrine\ORM\Tools\Pagination\Paginator->getIterator()
#10 /var/app/current/application/src/Api/Manager.php(221): Omeka\Api\Adapter\AbstractEntityAdapter->search(Object(Omeka\Api\Request))
#11 /var/app/current/application/src/Api/Manager.php(59): Omeka\Api\Manager->execute(Object(Omeka\Api\Request))
#12 /var/app/current/modules/GoogleAnalytics/Module.php(189): Omeka\Api\Manager->search('sites', Array)
#13 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): GoogleAnalytics\Module->printScript(Object(Laminas\EventManager\Event))
#14 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(170): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\EventManager\Event))
#15 /var/app/current/application/src/View/Helper/Trigger.php(61): Laminas\EventManager\EventManager->triggerEvent(Object(Laminas\EventManager\Event))
#16 [internal function]: Omeka\View\Helper\Trigger->__invoke('view.layout')
#17 /var/app/current/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(396): call_user_func_array(Object(Omeka\View\Helper\Trigger), Array)
#18 /var/app/current/application/view/layout/layout.phtml(11): Laminas\View\Renderer\PhpRenderer->__call('trigger', Array)
#19 /var/app/current/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(505): include('/var/app/curren...')
#20 /var/app/current/index.php(36): Laminas\View\Renderer\PhpRenderer->render(NULL)
#21 {main}
Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117 Stack trace: #0 /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(117): PDOStatement->execute(NULL) #1 /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1056): Doctrine\DBAL\Driver\PDOStatement->execute() #2 /var/app/current/application/src/Session/SaveHandler/Db.php(82): Doctrine\DBAL\Connection->executeUpdate('INSERT INTO ses...', Array) #3 [internal function]: Omeka\Session\SaveHandler\Db->write('8hch5n6b0vlq2n7...', '__Laminas|a:8:{...') #4 /var/app/current/vendor/laminas/laminas-session/src/SessionManager.php(235): session_write_close() #5 [internal function]: Laminas\Session\SessionManager->writeClose() #6 {main} Next Doctrine\DBAL\Driver\PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/P in /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 106

Really appreciate the help.

I’m not sure why that error is happening but it doesn’t seem to be directly related to uploading a file. Is that what you were doing when it happened?

The error is seemingly coming from the Google Analytics module, which you might try to disable, but I’m not really sure if it’s related or not. The “gone away” error happens when the connection to the database drops… maybe a timeout or some similar issue like that?

Nice - disabling that module exposed another MySQL error regarding max_allowed_packet.

I fixed that error with MySQL configuration.

Now I’m able to upload the JSON files and try to view them in Universal Viewer. Unfortunately Universal Viewer just hangs the browser when opening the model and eventually shows a warning about long-running scripts and timing out.

I’m using the AmazonS3 module and noticing a fatal error with that and ArchiveRepertory (which is apparently required in order to properly load model textures):

Fatal error: Declaration of AmazonS3\File\ArchiveRepertory\FileManager::createArchiveFolders($archiveFolder, $pathFolder = '') must be compatible with ArchiveRepertory\File\FileManager::createArchiveFolders($archiveFolder, $pathFolder = ''): bool in /var/app/current/modules/AmazonS3/src/File/ArchiveRepertory/FileManager.php on line 6

Not sure if that’s related to the hanging, but I’ve opened a GitHub issue with the ArchiveRepertory dev to hopefully get that sorted as the next step.

Ok, thanks, there will be a fix in a few days.

have found any proper solution?