pkp / pkp-lib

The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.
https://pkp.sfu.ca
GNU General Public License v3.0
297 stars 441 forks source link

Out of memory error when uploading a file #10144

Open jonasraoni opened 3 days ago

jonasraoni commented 3 days ago

Describe the bug An out of memory issue is happening at the upload file route, see the request and the error log below. I didn't try to simulate, but perhaps we're handling the file in a bad way somewhere (e.g. loading the content into a variable), it's needed to check if previous versions are affected as well.

POST /index.php/journal/$$$call$$$/wizard/file-upload/file-upload-wizard/upload-file?submissionId=9364&stageId=3&fileStage=15&reviewRoundId=969&assocType=&assocId=&queryId=`
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 421
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 16384 bytes) in /var/www/html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 566
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 4096 bytes) in Unknown on line 0

What application are you using? OJS 3.4