Problems upgrading to Omeka classic 3.2

I am trying to upgrade us from omeka classic 3.1.2 to 3.2. when I click on the button to launch the database upgrade, it crashes our entire server. It does this consistently.

system info:

Web Server

Ubuntu 20.04.6 LTS

Apache 2.4.41

PHP 7.4 (via mod-php)

Database Server

Ubuntu 22.04.5 LTS

MariaDB 10.6

Error messages

From the database logs:

2025-09-26 10:09:23 169 [Warning] Aborted connection 169 to db: ‘library’ user: ‘library’ host: ‘lib-omeka-app2.server.gvsu.edu’

From the apache error log:

[Fri Sep 26 10:09:28.913112 2025] [php7:error] [pid 3075715] [client 119.12.165.246:0] PHP Fatal error: Uncaught Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : MySQL server has gone away in /var/www/html/omeka/ap
plication/libraries/Zend/Db/Statement/Mysqli.php:215\nStack trace:\n#0 /var/www/html/omeka/application/libraries/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute()\n#1 /var/www/html/omeka/application/libraries/Zend/Db/Ada
pter/Abstract.php(480): Zend_Db_Statement->execute()\n#2 /var/www/html/omeka/application/libraries/Zend/Db/Adapter/Abstract.php(576): Zend_Db_Adapter_Abstract->query()\n#3 /var/www/html/omeka/application/libraries/Zend/Db/Table/Abstrac
t.php(1076): Zend_Db_Adapter_Abstract->insert()\n#4 /var/www/html/omeka/application/libraries/Zend/Session/SaveHandler/DbTable.php(356): Zend_Db_Table_Abstract->insert()\n#5 /var/www/html/omeka/application/libraries/Omeka/Session/SaveH
andler/DbTable.php(102): Zend_Session_SaveHandler_DbTable->write()\n#6 [internal function]: Omeka_Session_SaveHandler_DbTable->write()\n#7 /var/www/html/omeka/application/libraries/Zend/Session.php( in /var/www/html/omeka/application/l
ibraries/Zend/Db/Statement/Mysqli.php on line 215, referer: Browse Items · Digital Collections
2

The application error message seems to just be a “normal” request, not an error that’s happening during the upgrade. Do you have more messages from either log? These don’t quite seem to have much useful information for telling what’s happening.

Also: what does “crashes our entire server” mean here specifically? The web server, the database server, both? Is it slow like a timeout, or immediate? Does the upgrade report success, failure, an error, or nothing at all?

The two messages I’ve provided are all we have. I can’t find any other error messages anywhere.

The database upgrade process renders the entire omeka web server unresponsive. No ping, no http response, no ssh, nothing. Any attempt to contact it results in a timeout error. It looks like the server is…stuck, somehow? There is no report of progress from the upgrade, because the entire server is unresponsive. We have to restart it to get it to start responding again, at which point the upgrade reverts back to the button to upgrade the database, so the database upgrade is not happening.

I have checked the db.ini file to make sure the application has the correct database credentials, and it does. I know they work becasue they are the same credentials the old version of omeka is using, without issue.

Looking at the schema_migrations table might provide a clue: what numbers are listed there? Particularly any that start with “2024.”

here’s the entire contents of schema_migration:

version |

±---------------+

| 20100401000000 |

| 20100810120000 |

| 20110113000000 |

| 20110124000001 |

| 20110301103900 |

| 20110328192100 |

| 20110426181300 |

| 20110601112200 |

| 20110627223000 |

| 20110824110000 |

| 20120112100000 |

| 20120220000000 |

| 20120221000000 |

| 20120224000000 |

| 20120224000001 |

| 20120402000000 |

| 20120516000000 |

| 20120612112000 |

| 20120623095000 |

| 20120710000000 |

| 20120723000000 |

| 20120808000000 |

| 20120808000001 |

| 20120813000000 |

| 20120914000000 |

| 20121007000000 |

| 20121015000000 |

| 20121015000001 |

| 20121018000001 |

| 20121110000000 |

| 20121218000000 |

| 20130422000000 |

| 20130426000000 |

| 20130429000000 |

| 20130701000000 |

| 20130809000000 |

| 20140304131700 |

| 20150211000000 |

| 20150310141100 |

| 20150814155100 |

| 20151118214800 |

| 20151209103299 |

| 20151209103300 |

| 20161209171900 |

| 20170331084000 |

| 20170405125800 |

| 20200127165700 |

| 20240709181800 |

| 20240713184500 |

±---------------+

49 rows in set (0.013 sec)

MariaDB [library]>

OK, this was my basic guess: the database migration that’s causing your problem is the one for the sessions table.

I bet the sessions table for your install is absolutely massive, and just therefore takes a long time to be updated. You might be able to just wait out the problem if you try updating again, but you have better options too.

If you run TRUNCATE on the sessions table, which deletes all the rows in the table, the upgrade should be able to proceed quicky after that. Note: doing this will log out any active user sessions and people will have to log back in.

For future reference: the Admin Tools plugin provides an easy way to get rid of old expired sessions.

1 Like

3.2 includes a fix for servers that are set up to not periodically purge the old sessions, so this shouldn’t be a significant problem going forward.

thank you for this-I’ve truncated the table, and I’ve set up time tomorrow (Friday) to try the upgrade again. I’ll let you know how it goes.

I tried the upgrade again today after truncating the table, and the database upgrade step failed with the following error. When I try accessing the admin link again, I get the database upgrade button. Whatever happened doesn’t seem to have altered the database enough that the old Omeka installation is not working-I was able to roll back and it looks like it’s working without issue.

Perhaps I should skip this version and try with the next one? I’ve never had so much trouble upgrading Omeka in the years we’ve been using it.

Omeka encountered an error when upgrading your installation.

SQL error in migration: Mysqli statement execute error : Duplicate column name ‘added’

Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Duplicate column name ‘added’ in /var/www/html/omeka/application/libraries/Zend/Db/Statement/Mysqli.php:215

Stack trace:

#0 /var/www/html/omeka/application/libraries/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute()

#1 /var/www/html/omeka/application/libraries/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute()

#2 /var/www/html/omeka/application/libraries/Omeka/Db.php(80): Zend_Db_Adapter_Abstract->query()

#3 /var/www/html/omeka/application/libraries/Omeka/Db.php(287): Omeka_Db->__call()

#4 /var/www/html/omeka/application/migrations/20100810120000_detachCollectorsFromEntities.php(33): Omeka_Db->queryBlock()

#5 /var/www/html/omeka/application/migrations/20100810120000_detachCollectorsFromEntities.php(18): detachCollectorsFromEntities->_migrateCollections()

#6 /var/www/html/omeka/application/libraries/Omeka/Db/Migration/Manager.php(232): detachCollectorsFromEntities->up()

#7 /var/www/html/omeka/application/libraries/Omeka/Db/Migration/Manager.php(111): Omeka_Db_Migration_Manager->_migrateUp()

#8 /var/www/html/omeka/application/controllers/UpgradeController.php(44): Omeka_Db_Migration_Manager->migrate()

#9 /var/www/html/omeka/application/libraries/Zend/Controller/Action.php(516): UpgradeController->migrateAction()

#10 /var/www/html/omeka/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch()

#11 /var/www/html/omeka/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch()

#12 /var/www/html/omeka/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(106): Zend_Controller_Front->dispatch()

#13 /var/www/html/omeka/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()

#14 /var/www/html/omeka/application/libraries/Omeka/Application.php(73): Zend_Application->run()

#15 /var/www/html/omeka/admin/index.php(28): Omeka_Application->run()

#16 {main}

Please restore from your database backup and try again. If you have any questions please refer to Omeka documentation or post a message on the Omeka forums.

You’ve got something totally different from before going on this time: that migration you hit the error on is ancient, from 2010.

Which table did you truncate? You’d get an error like this if you truncated the schema_migrations table instead of the sessions table.

Yeah, it looks like I misread and wiped the migrations table. I’ll see if we can restore from backup. Is there any way to fix this if we can’t?

Edit: looks like we can recover the table, so we are good. I’ll do so and retry the upgrade.

Upgrade looks successful after truncating the sessions table. Thanks for your help!

Thanks for reporting your results.

The issue I am encountering may not be related, but I am having a problem upgrading to Omeka 3.2. I think my issue may be related to the Neatline plugin used in one of the exhibits. I found an old post about incompatibility but I’m bringing my question here because I did not see a resolution there. Does anyone in the community here know of any known issues with old plugin compatibility when upgrading to 3.2? Thanks!

Iris,

You’ll probably want to make a new thread of your own about your problem; as you say, it might not be related to this one.

What we’ll need to know there is what’s happening. Were you able to upgrade? What problems are you having? Are they only related to Neatline?

Thank you. I will do so.