Having intermittent PHP timeout errors. Narrowed some of it down to abusive IPs, but have since enabled cloudflare and seems to be better, but still happening sometimes.
Is there anything else I can do to enable more verbose logging, find out exactly what in the PHP calls are erroring out? Here is the php error log currently, but it doesn’t show anything more:
This most often is felt when logged in as an editor/admin, and then viewing submissions. Sometimes it happens just trying to view the “All Active” submissions, sometimes once you click to view a submission, it happens as its trying to load the submissions info (such as the Review tab).
What application are you using?
For example, OJS 3.3.0.15
OJS itself is not very CPU-intensive – it’s typically database limited. Heavy CPU load is probably a result of simultaneous requests rather than any particular request requiring a lot of CPU effort. Besides identifying any unusual sources of traffic by reviewing the access log, there are some suggestions here:
There is no verbose mode for logging more about what OJS is doing, except the debug option in config.inc.php, which dumps database queries into the log.
Regards,
Alec Smecher
Public Knowledge Project Team
In our case, the CPU usage is not high. but the PHP queries are timing out at 300 seconds, and the website becomes very slow. We have identified search crawlers have been hitting our pages, and have been filling the PHP queue, so our end users end up getting timeouts.
Is there a way to slow crawlers, or otherwise troubleshoot what may be causing issues with, for instyance, “End of script output before headers: index.php”
[Wed Feb 12 05:42:43.880190 2025] [fcgid:warn] [pid 45512:tid 139854912481024] [client 107.20.105.74:23589] mod_fcgid: read data timeout in 300 seconds, referer: https://www.paijournal.com/
[Wed Feb 12 05:42:43.880246 2025] [core:error] [pid 45512:tid 139854912481024] [client 107.20.105.74:23589] End of script output before headers: index.php, referer: https://www.paijournal.com/
[Wed Feb 12 05:43:48.251097 2025] [fcgid:warn] [pid 45512:tid 139854895695616] [client 72.23.202.249:0] mod_fcgid: read data timeout in 300 seconds
[Wed Feb 12 05:43:48.251150 2025] [core:error] [pid 45512:tid 139854895695616] [client 72.23.202.249:0] End of script output before headers: index.php
[Wed Feb 12 05:44:05.008094 2025] [fcgid:warn] [pid 45512:tid 139854828553984] [client 72.23.202.249:0] mod_fcgid: read data timeout in 300 seconds, referer: https://www.paijournal.com/index.php/paijournal/submissions
If you’ve enabled the “recommend similar articles” plugin, you might consider disabling it; it can cause search engines to execute a lot of heavy queries using the search feature. See:
Regards,
Alec Smecher
Public Knowledge Project Team
This is all very strange. This past hour I worked with my web hosting provider. We disabled all access to the site except for my IP address. Still, same timeout issues. This isolates the issue away from being bots.
If you’ve just done a large-scale change like an upgrade to a new OJS, it’s possible that legitimate crawlers are going to descend on your journal in large volume. You can instruct them to scale their requests (e.g. delaying a few seconds between them) using a file called robots.txt.
Generally crawlers shouldn’t be indexing content using the search feature, though. That’ll incur a lot of load, if it’s happening, and you might want to investigate its source.
Regards,
Alec Smecher
Public Knowledge Project Team