Description of issue or problem I’m having:
We are experiencing high memory and disk usage issues. The system always maintains high CPU, I/O and memory usage rates.
The server is virtualized with 8GB of memory and 4 shared cores.
Steps I took leading up to the issue:
We updated to the latest version and the problem still persists.
Version history:
3.3.0.10 3 3 0 10 2022-04-04
3.3.0.8 3 3 0 8 2021-12-17
3.2.1.4 3 2 1 4 2021-12-17
3.1.2.4 3 1 2 4 2021-12-17
2.4.8.5 2 4 8 5 2020-06-05
2.4.8.0 2 4 8 0 2016-05-02
2.3.7.0 2 3 7 0 2012-04-04
2.2.2.0 2 2 2 0 2008-09-05
What I tried to resolve the issue:
Applications some mysql database better performance settings.
Application Version - e.g., OJS 3.1.2:
OJS 3.3.0-10
Additional information, such as screenshots and error log messages if applicable:
We suspect that the database is too big with some gigantic tables such as:
metrics.ibd: 8.5G
notifications.ibd: 1.6G
submission_search_object_keywords.ibd: 1.5G
email_log.ibd: 732M
publication_settings.ibd: 472M
user_settings.ibd: 440M
citations.ibd: 212M
event_log_settings.ibd: 192M
author_settings.ibd: 164M
Any suggestion is welcome.
1 Like
Hi @luciano,
Wow! You’ve used OJS for a long time!
I wonder too, if you could check your PHP error logs and include any relevant messages from there.
I will pass this along to our development/systems folks and see if they can make any suggestions when they are available.
-Roger
PKP Team
Hi @rcgillis,
Thanks for the feedback.
The repeatedly encountered error:
[Mon Apr 11 02:38:54.086999 2022] [php7:error] [pid 3215] [client 168.119.68.117:29532] PHP Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'EditedEditedEditedEdited' for key 'sessions_pkey' in /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:115\nStack trace:\n#0 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(115): PDOStatement->execute()\n#1 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(489): Doctrine\\DBAL\\Driver\\PDOStatement->execute()\n#2 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}()\n#3 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\\Database\\Connection->runQueryCallback()\n#4 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(496): Illuminate\\Da in /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671, referer: https://periodicos.ufsm.br/revistadireito/article/view/7063/4275
[Mon Apr 11 23:56:56.187546 2022] [php7:error] [pid 22255] [client 195.154.123.143:34136] PHP Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'EditedEditedEditedEdited' for key 'sessions_pkey' in /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:115\nStack trace:\n#0 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(115): PDOStatement->execute()\n#1 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(489): Doctrine\\DBAL\\Driver\\PDOStatement->execute()\n#2 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}()\n#3 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\\Database\\Connection->runQueryCallback()\n#4 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(496): Illuminate\\Da in /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671, referer: https://periodicos.ufsm.br/educacaoespecial/article/view/27435/pdf
[Mon Apr 11 23:57:29.844136 2022] [php7:error] [pid 22399] [client 168.119.68.172:59712] PHP Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'EditedEditedEditedEdited' for key 'sessions_pkey' in /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:115\nStack trace:\n#0 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(115): PDOStatement->execute()\n#1 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(489): Doctrine\\DBAL\\Driver\\PDOStatement->execute()\n#2 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}()\n#3 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\\Database\\Connection->runQueryCallback()\n#4 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(496): Illuminate\\Da in /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671, referer: https://periodicos.ufsm.br/educacaoespecial/article/view/4951/2980
and
[Mon Apr 11 01:23:50.749959 2022] [php7:error] [pid 29924] [client 66.249.64.22:49773] PHP Fatal error: Uncaught Error: Call to a member function getPublished() on null in /var/www/html/ojs-3.3.0-10/cache/t_compile/f9cbad54bc17edf9cd863b38d6dce3361ce3799b^acf1fc671fe3149386beb488bd42d95154e9d6f3_0.app.frontendpagessearchAuthor.php:49\nStack trace:\n#0 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_624ef3be3457c6_49781049()\n#1 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()\n#2 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render()\n#3 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render()\n#4 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(134): Smarty_Internal_TemplateBase->_exec in /var/www/html/ojs-3.3.0-10/cache/t_compile/f9cbad54bc17edf9cd863b38d6dce3361ce3799b^acf1fc671fe3149386beb488bd42d95154e9d6f3_0.app.frontendpagessearchAuthor.php on line 49
[Mon Apr 11 03:31:14.007354 2022] [php7:error] [pid 7029] [client 207.46.13.179:5376] PHP Fatal error: Uncaught Error: Call to a member function getPublished() on null in /var/www/html/ojs-3.3.0-10/cache/t_compile/f9cbad54bc17edf9cd863b38d6dce3361ce3799b^acf1fc671fe3149386beb488bd42d95154e9d6f3_0.app.frontendpagessearchAuthor.php:49\nStack trace:\n#0 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_624ef3be3457c6_49781049()\n#1 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()\n#2 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render()\n#3 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render()\n#4 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(134): Smarty_Internal_TemplateBase->_exec in /var/www/html/ojs-3.3.0-10/cache/t_compile/f9cbad54bc17edf9cd863b38d6dce3361ce3799b^acf1fc671fe3149386beb488bd42d95154e9d6f3_0.app.frontendpagessearchAuthor.php on line 49
[Mon Apr 11 05:51:37.114264 2022] [php7:error] [pid 17786] [client 66.249.64.23:45161] PHP Fatal error: Uncaught Error: Call to a member function getPublished() on null in /var/www/html/ojs-3.3.0-10/cache/t_compile/f9cbad54bc17edf9cd863b38d6dce3361ce3799b^acf1fc671fe3149386beb488bd42d95154e9d6f3_0.app.frontendpagessearchAuthor.php:49\nStack trace:\n#0 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_624ef3be3457c6_49781049()\n#1 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()\n#2 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render()\n#3 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render()\n#4 /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(134): Smarty_Internal_TemplateBase->_exec in /var/www/html/ojs-3.3.0-10/cache/t_compile/f9cbad54bc17edf9cd863b38d6dce3361ce3799b^acf1fc671fe3149386beb488bd42d95154e9d6f3_0.app.frontendpagessearchAuthor.php on line 49
and this more rare errors
[Mon Apr 11 00:35:37.119239 2022] [php7:error] [pid 26046] [client 66.249.64.22:64702] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 126
[Mon Apr 11 00:42:04.132953 2022] [php7:error] [pid 26679] [client 66.249.64.22:63610] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php on line 57
[Mon Apr 11 10:52:34.851188 2022] [php7:error] [pid 11706] [client 185.191.171.37:40714] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 1284
[Mon Apr 11 10:53:05.815185 2022] [php7:error] [pid 12104] [client 185.191.171.37:17450] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/ojs-3.3.0-10/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Query/Expression.php on line 42
[Mon Apr 11 19:25:38.010655 2022] [php7:error] [pid 29106] [client 66.249.64.62:50485] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/ojs-3.3.0-10/lib/pkp/classes/db/DAO.inc.php on line 54
Regards,
Luciano da Silva
Hello,
Does anyone have any suggestions for this problem?
Any solution?
Thanks
Hi @luciano,
I see three different problems here.
First, the key violation on sesions
table: you can fix this just truncating the table (or manually deleting all rows in it).
Second the errors in cached files: I suggest just cleaning the cache, so that the system will recreate fresh new copies (I suspect there are cache leftovers from a previous version).
Third, and more important: your system is configured to allow up to 512MB of RAM for PHP scripts. I’d increase it to 1GB. Perhaps your system is really undersized for your installation.