PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes)

please help (upgrade ojs-2.4.8-5 to ojs-3.2.1.4)

PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in D:\wamp64\www\ojs32\lib\pkp\lib\vendor\adodb\adodb-php\adodb.inc.php on line 1180
[11-Oct-2021 15:45:51 Asia/Kolkata] PHP Stack trace:
[11-Oct-2021 15:45:51 Asia/Kolkata] PHP 1. {main}() D:\wamp64\www\ojs32\index.php:0
[11-Oct-2021 15:45:51 Asia/Kolkata] PHP 2. Application->execute() D:\wamp64\www\ojs32\index.php:68
[11-Oct-2021 15:45:51 Asia/Kolkata] PHP 3. Dispatcher->dispatch() D:\wamp64\www\ojs32\lib\pkp\classes\core\PKPApplication.inc.php:281
[11-Oct-2021 15:45:51 Asia/Kolkata] PHP 4. PageRouter->route() D:\wamp64\www\ojs32\lib\pkp\classes\core\Dispatcher.inc.php:143
[11-Oct-2021 15:45:51 Asia/Kolkata] PHP 5. PageRouter->_authorizeInitializeAndCallRequest() D:\wamp64\www\ojs32\lib\pkp\classes\core\PKPPageRouter.inc.php:231
[11-Oct-2021 15:45:51 Asia/Kolkata] PHP 6. InstallHandler->installUpgrade() D:\wamp64\www\ojs32\lib\pkp\classes\core\PKPRouter.inc.php:391
[11-Oct-2021 15:45:51 Asia/Kolkata] PHP 7. UpgradeForm->execute() D:\wamp64\www\ojs32\lib\pkp\pages\install\InstallHandler.inc.php:106
[11-Oct-2021 15:45:51 Asia/Kolkata] PHP 8. Upgrade->execute() D:\wamp64\www\ojs32\lib\pkp\classes\install\form\UpgradeForm.inc.php:42
[11-Oct-2021 15:45:51 Asia/Kolkata] PHP 9. Upgrade->executeInstaller() D:\wamp64\www\ojs32\lib\pkp\classes\install\Installer.inc.php:186
[11-Oct-2021 15:45:51 Asia/Kolkata] PHP 10. Upgrade->executeAction() D:\wamp64\www\ojs32\lib\pkp\classes\install\Installer.inc.php:263
[11-Oct-2021 15:45:51 Asia/Kolkata] PHP 11. Upgrade->convertQueries() D:\wamp64\www\ojs32\lib\pkp\classes\install\Installer.inc.php:417
[11-Oct-2021 15:45:51 Asia/Kolkata] PHP 12. StageAssignmentDAO->getBySubmissionAndRoleId() D:\wamp64\www\ojs32\classes\install\Upgrade.inc.php:1588
[11-Oct-2021 15:45:51 Asia/Kolkata] PHP 13. StageAssignmentDAO->_getByIds() D:\wamp64\www\ojs32\lib\pkp\classes\stageAssignment\StageAssignmentDAO.inc.php:56
[11-Oct-2021 15:45:51 Asia/Kolkata] PHP 14. StageAssignmentDAO->retrieve() D:\wamp64\www\ojs32\lib\pkp\classes\stageAssignment\StageAssignmentDAO.inc.php:331
[11-Oct-2021 15:45:51 Asia/Kolkata] PHP 15. ADODB_mysqli->Execute() D:\wamp64\www\ojs32\lib\pkp\classes\db\DAO.inc.php:100

Hi @shantanusingh

You’ll need to restore your OJS installation from backup and then re-run your upgrade again, like this:

php -d memory_limit=2048M tools/upgrade.php upgrade

You can replace the memory limit with however much RAM you want the upgrade process to have, being careful to not exceed server limits.

Best,
Jason

1 Like

thanks for reply. i have change memory_limit in php.ini file and now its working.

1 Like