PHP timeouts when viewing submissions, generally slow site performance

Describe the issue or problem
“An unexpected error has occurred. Please reload the page and try again”

Steps I took leading up to the issue
For example:

  1. Go to Submissions->all active, get the circling wheel, times out with error.
  2. Sometimes it renders the submissions, but then happens when clicking VIEW on a submission.
  3. It’s intermittent, does not happen all the time.

PHP error logs show:

[Thu Jan 23 12:59:45.072089 2025] [fcgid:warn] [pid 98794:tid 140071135196928] [client 72.23.202.249:0] mod_fcgid: read data timeout in 300 seconds, referer: https://www.paijournal.com/index.php/paijournal/submissions
[Thu Jan 23 12:59:45.072140 2025] [core:error] [pid 98794:tid 140071135196928] [client 72.23.202.249:0] End of script output before headers: index.php, referer: https://www.paijournal.com/index.php/paijournal/submissions

What application are you using?
3.3.0.15
Additional information
1000000395

Looks like we are also getting these in our erorr log, relayed to Custom Locale plugin.

Any ideas how to resolve?

[Fri Jan 24 11:23:00.669709 2025] [fcgid:warn] [pid 130031:tid 140071185553152] [client 72.23.202.249:0] mod_fcgid: stderr: PHP Warning: Undefined array key 0 in /home/dh_paijournal_vps/paijournal.com/plugins/generic/customLocale/controllers/grid/CustomLocaleAction.inc.php on line 28, referer: https://www.paijournal.com/index.php/paijournal/management/settings/website

Disabling Dreamhost web app firewall seems to have resolved so far. So, as I do not want to continue with the firewall disabled (even though Cloudflare is enabled), I need to reopen case with Dreamhost.

After speaking with Dreamhost, they confirmed the modsecurity web app firewall is the root cause of our timeout issues. There is no way to tune it, either. They advised leaving it off, ensuring vendor code and platform is always up to date.

Cloudflare is still in place in my case, so there is a web app firewall protecting the site. Unsure currently if direct IP attacks are possible against the Dreamhost VPS server, but I think this system under my specific subscription still uses shard IP addresses and requires HTTPS headers to enumerate correct domain mappings.

At any rate- form Dreamhost users, please put this high on you considerations list when deploying OJS. Their Modsecurity web app firewall will affect your site. This post does not make a recommendation to disable the firewall, quite the opposite, you must perform your own due diligence when faced with deploying OJS to Dreamhost.