[OJS 3.3.0.8] Error 504 Gateway Timeout when trying to upload XML or HTML galley

Describe the issue or problem
I’m trying to upload an XML and HTML galley, and the process never finish. There isn’t any log error message; However, in the browser console network tab I got the following message:

https://myjournal/index.php/aca/$$$call$$$/api/file/manage-file-api/save-metadata?submissionId=90213&stageId=5&reviewRoundId=&fileStage=10&submissionFileId=283460

Steps I took leading up to the issue

  1. In the window to create a new galley
  2. Select a file
  3. Upload a dependent file
  4. The process never finish

What application are you using?
I am using OJS 3.3.0.8 with the following environment:
Nginx 1.26.3
PHP 7.4.33 and PHP-FPM
MySQL 8.0

It’s important to say that I have set up the following directives on my php.ini
max_execution_time = 30
upload_max_filesize = 50M
post_max_size = 50M

Additional information
It seems that my OJS is behind a load balancer; I have asked to the IT support team to increase the execution time directly in the balancer; however, they answered me that it’s no secure because that action breaks their security policy. I forgot to mention that this not happen when the galley file is a PDF, with this kind of file the process finish in a while of 50 or 60 secs.

Is there a way to resolve this, from the code? Thanks in advance.

Hi @juancure,

In OJS 3.3.0-x, when you upload a galley file (e.g. HTML, XML, or PDF), OJS indexes the text contents for searching. This can take a while to complete.

In 3.4.0-x and later, this no longer happens at the moment you upload the file. If your server is having trouble the length of the request, one option would be to upgrade to 3.4.0-x or later.

(We’ll be releasing 3.5.0 in approx. a month – just FYI.)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher thanks for your suggestion. I remember had read that the uploading of galleys makes a reindexing of search indexes, so I decided to run the tools/rebuildSearchIndexes.php thinking with this action the process would be faster. In this moment we are thinking to upgrade this OJS 3.3.0.8 to the 3.3.0.20, but probably decide to migrate to the last LTS of OJS 3.4.x, considering your suggestion.

Hi @juancure,

OJS 3.4.0-x isn’t LTS; the next LTS release will be from the 3.5.0 line (probably 1-2 builds after the initial release of 3.5.0). Watch for an announcement on that. Meanwhile, upgrading to the latest 3.3.0-x is a good idea, but probably won’t solve the specific issue you’re encountering.

Thanks,
Alec Smecher
Public Knowledge Project Team

This topic was automatically closed after 9 days. New replies are no longer allowed.