Ojs2: 404 Not Found

**Website very slow **
Hello pkp team,
I installed a new server Debian 12 with php 8.1 and mariadb 10.11.3 and apache webserver
I upgraded OJS from 3.3.0.8 to 3.3.0.15 under windows 10 then moved the site to debian.
Everything is ok except loading time of journals’s home pages and article pages, also administration page, it takes some time to load.
here is my apache errors log :

[Mon Sep 04 16:37:34.818704 2023] [php:notice] [pid 21399] [client 66.249.66.163:55814] ojs2: 404 Not Found
[Mon Sep 04 16:41:39.555684 2023] [php:notice] [pid 21409] [client 52.167.144.182:29641] ojs2: 404 Not Found
[Mon Sep 04 16:41:44.668095 2023] [php:notice] [pid 21418] [client 52.167.144.182:21318] ojs2: 404 Not Found
[Mon Sep 04 16:54:13.128406 2023] [php:notice] [pid 21601] [client 52.167.144.16:4479] ojs2: 404 Not Found
[Mon Sep 04 16:54:41.632495 2023] [php:notice] [pid 21634] [client 52.167.144.16:4433] ojs2: 404 Not Found
[Mon Sep 04 16:56:28.108158 2023] [php:notice] [pid 21635] [client 66.249.66.163:38214] ojs2: 404 Not Found
[Mon Sep 04 16:58:56.928765 2023] [php:notice] [pid 21601] [client 54.36.149.63:35219] ojs2: 404 Not Found
[Mon Sep 04 17:02:14.535350 2023] [php:notice] [pid 21647] [client 52.167.144.22:9160] ojs2: 404 Not Found
[Mon Sep 04 17:03:36.314741 2023] [php:notice] [pid 21641] [client 66.249.66.165:50016] ojs2: 404 Not Found
[Mon Sep 04 17:07:29.970135 2023] [php:notice] [pid 21586] [client 40.77.167.177:2133] ojs2: 404 Not Found
[Mon Sep 04 17:08:59.636994 2023] [php:notice] [pid 21601] [client 66.249.66.164:37005] ojs2: 404 Not Found

Help please

Today’s Log :
[Mon Sep 18 14:26:57.763853 2023] [php:notice] [pid 1698] [client 40.77.167.22:51935] ojs2: 404 Not Found
[Mon Sep 18 14:31:04.662241 2023] [php:notice] [pid 1728] [client 40.77.167.22:52090] ojs2: 404 Not Found
[Mon Sep 18 14:35:17.197704 2023] [php:error] [pid 1727] [client 18.209.56.32:48568] script ‘/var/www/html/gate.php’ not found or unable to stat
[Mon Sep 18 14:43:16.196141 2023] [php:notice] [pid 1927] [client 52.167.144.23:62720] ojs2: 404 Not Found
[Mon Sep 18 14:44:03.562046 2023] [php:error] [pid 1929] [client 185.228.135.232:65317] script ‘/var/www/html/wp-login.php’ not found or unable to stat
[Mon Sep 18 14:44:03.702969 2023] [php:error] [pid 1929] [client 185.228.135.232:65317] script ‘/var/www/html/xmlrpc.php’ not found or unable to stat
[Mon Sep 18 14:45:41.048695 2023] [php:notice] [pid 1760] [client 40.77.167.132:5024] ojs2: 404 Not Found
[Mon Sep 18 14:48:05.349908 2023] [php:notice] [pid 1936] [client 40.77.167.132:6602] ojs2: 404 Not Found
[Mon Sep 18 14:48:05.350369 2023] [php:notice] [pid 1934] [client 40.77.167.132:6616] ojs2: 404 Not Found
[Mon Sep 18 14:48:22.592260 2023] [php:notice] [pid 1955] [client 40.77.167.132:1602] ojs2: 404 Not Found
[Mon Sep 18 14:51:34.036579 2023] [php:notice] [pid 1941] [client 185.191.171.5:20908] ojs2: 404 Not Found
[Mon Sep 18 14:52:54.309873 2023] [php:notice] [pid 1971] [client 66.249.66.163:61992] ojs2: 404 Not Found
[Mon Sep 18 14:53:57.749931 2023] [php:notice] [pid 1966] [client 66.249.66.165:62379] ojs2: 404 Not Found
[Mon Sep 18 14:56:32.181275 2023] [php:notice] [pid 1985] [client 40.77.167.61:20246] ojs2: 404 Not Found
[Mon Sep 18 14:58:34.700544 2023] [php:notice] [pid 1981] [client 66.249.66.165:36390] ojs2: 404 Not Found
[Mon Sep 18 15:00:02.374368 2023] [php:notice] [pid 1978] [client 40.77.167.61:17324] ojs2: 404 Not Found
[Mon Sep 18 15:00:18.909936 2023] [php:notice] [pid 1987] [client 66.249.66.163:54894] ojs2: 404 Not Found
[Mon Sep 18 15:03:07.196408 2023] [php:notice] [pid 2004] [client 52.167.144.138:23878] ojs2: 404 Not Found
[Mon Sep 18 15:06:07.040637 2023] [php:notice] [pid 2003] [client 52.167.144.138:23872] ojs2: 404 Not Found
[Mon Sep 18 15:08:01.717198 2023] [php:notice] [pid 1995] [client 52.167.144.219:50975] ojs2: 404 Not Found
[Mon Sep 18 15:08:08.537701 2023] [php:notice] [pid 2029] [client 66.249.66.163:48202] ojs2: 404 Not Found
[Mon Sep 18 15:08:25.277397 2023] [php:notice] [pid 2013] [client 87.250.224.45:40212] ojs2: 404 Not Found
[Mon Sep 18 15:12:51.723508 2023] [php:notice] [pid 2180] [client 66.249.66.163:41718] ojs2: 404 Not Found
[Mon Sep 18 15:15:09.258511 2023] [php:error] [pid 2192] [client 52.167.144.182:31874] PHP Fatal error: Uncaught Error: Class “Egulias\EmailValidator\Warning\Warning” not found in /var/www/html/lib/pkp/lib/vendor/egulias/email-validator/src/Warning/DomainTooLong.php:5\nStack trace:\n#0 {main}\n thrown in /var/www/html/lib/pkp/lib/vendor/egulias/email-validator/src/Warning/DomainTooLong.php on line 5
[Mon Sep 18 15:15:20.333422 2023] [php:notice] [pid 2200] [client 52.167.144.219:50957] ojs2: 404 Not Found
[Mon Sep 18 15:15:21.373873 2023] [php:notice] [pid 2190] [client 52.167.144.219:50954] ojs2: 404 Not Found
[Mon Sep 18 15:17:06.496186 2023] [php:notice] [pid 2180] [client 85.208.96.198:43200] ojs2: 404 Not Found
[Mon Sep 18 15:17:20.028396 2023] [php:notice] [pid 2215] [client 87.250.224.83:52452] ojs2: 404 Not Found
[Mon Sep 18 15:24:50.043341 2023] [php:notice] [pid 2235] [client 105.103.201.254:48748] ojs2: 404 Not Found
[Mon Sep 18 15:24:54.269473 2023] [php:notice] [pid 2200] [client 105.103.201.254:48750] ojs2: 404 Not Found
[Mon Sep 18 15:25:37.934345 2023] [php:notice] [pid 2235] [client 52.167.144.178:39942] ojs2: 404 Not Found
[Mon Sep 18 15:26:41.383871 2023] [php:notice] [pid 2212] [client 66.249.66.164:36434] ojs2: 404 Not Found
[Mon Sep 18 15:27:56.080021 2023] [php:notice] [pid 2245] [client 40.77.167.22:52142] ojs2: 404 Not Found
[Mon Sep 18 15:30:53.914296 2023] [php:notice] [pid 2286] [client 66.249.66.163:61950] ojs2: 404 Not Found
[Mon Sep 18 15:32:00.650894 2023] [php:notice] [pid 2260] [client 40.77.167.48:22218] ojs2: 404 Not Found
[Mon Sep 18 15:32:59.615030 2023] [php:notice] [pid 2296] [client 40.77.167.22:52418] ojs2: 404 Not Found
[Mon Sep 18 15:33:33.038591 2023] [php:notice] [pid 2248] [client 52.167.144.147:62412] ojs2: 404 Not Found
[Mon Sep 18 15:33:36.335610 2023] [php:notice] [pid 2291] [client 5.255.231.69:52542] ojs2: 404 Not Found
[Mon Sep 18 15:39:25.697504 2023] [php:notice] [pid 2309] [client 52.167.144.173:57614] ojs2: 404 Not Found
[Mon Sep 18 15:39:26.740006 2023] [php:notice] [pid 2304] [client 52.167.144.173:57612] ojs2: 404 Not Found
[Mon Sep 18 15:43:38.066820 2023] [php:notice] [pid 2505] [client 66.249.66.164:61984] ojs2: 404 Not Found
[Mon Sep 18 15:43:44.729207 2023] [php:notice] [pid 2496] [client 52.167.144.235:7828] ojs2: 404 Not Found
[Mon Sep 18 15:46:48.451846 2023] [php:notice] [pid 2480] [client 87.250.224.45:40796] ojs2: 404 Not Found
[Mon Sep 18 15:47:31.921392 2023] [mpm_prefork:notice] [pid 543] AH00170: caught SIGWINCH, shutting down gracefully
PHP Warning: Module “intl” is already loaded in Unknown on line 0
[Mon Sep 18 15:47:33.370643 2023] [mpm_prefork:notice] [pid 2594] AH00163: Apache/2.4.57 (Debian) configured – resuming normal operations
[Mon Sep 18 15:47:33.370754 2023] [core:notice] [pid 2594] AH00094: Command line: ‘/usr/sbin/apache2’

[Mon Sep 18 15:54:08.819364 2023] [php:notice] [pid 2618] [client 66.249.66.163:60491] ojs2: 404 Not Found
[Mon Sep 18 15:54:34.834574 2023] [php:notice] [pid 2618] [client 66.249.66.163:52712] ojs2: 404 Not Found
[Mon Sep 18 15:54:52.350580 2023] [php:notice] [pid 2616] [client 40.77.167.6:35008] ojs2: 404 Not Found

Hi @azzedine,

The “ojs2: 404 Not Found” error mostly or always is from bots and crawlers.

You can hit F12 on your web browser and reload your homepage and you can check what is loading the most time and figure out what might be the problem.
I suggest to use shift+F5 to refresh the page, holding shift deleted every data you have saved from the web in your browser, so you can see all the requests.

Best regards,
JHRS

Hi @jhrs
Thank you for the reply,
I already watched the loading details in the chrome developpement tool,
The only bots and crawlers are “google analytics” and “google tag manager”
but still that doesn’t explain all this slowness, and only the journal homepage and the article page are slow to load, the rest of pages like the “about the journal” page (http://revue.umc.edu.dz/index.php/h/about)
are fast …the error.log file shows a lot of (ojs 2: 404 not found)…
Thanks anyway, I will continue my monitoring to find out the problem source…
I will tell you if I find anything

What engine do you use?
Please confirm you are on innodb with utf8mb4.

I have the same problem in my OJS 3.3.0-15

1 Like

Hello @marc
All the tables are on innodb with utf8mb4 collation
I dont think this is the problem…
I tried many things but never found why the journal homepage is so slow …
Pingdom tells me there is a wait time (TTFB) of 7 to 8 secondes in the first request before the server replies…
Now the question is : what is the first request when we call a journal home page (after SSL and DNS) ?

In our journal, it´s take many seconds all the articles! Not in all the pages (About, rules, etc.). But if you want to see the current or archive, it´s very slow

You can see it yourself: http://www.iaa.fadu.uba.ar/ojs/index.php/anales

Hi @azzedine,

Is the database and PHP (OJS content) on the same server? If not, it could explain this. E.g., for more details see Submissions (again) loading slowly - #8 by asmecher

I am seeing that this query has not progressed over time, no one has asked about it again and I don’t see any solutions to it. Has anyone else had this problem and been able to solve it?

I think this is an error message from the ojs core application and it does not affect any part of the platform, a message that has not been updated in the version 3.
It is everywhere in the log file but nothing serious…

The message comes from here:

lib/pkp/classes/core/Dispatcher.inc.php
function handle404() {
...
}