High CPU usage and http error 500

After upgrading from to, my website is particularly slow to access and is almost difficult to open when opening specific article detail pages. And occasionally this message appears: http error 500. After contacting the server hosting provider’s technicians, they told me the following reasons for the slow access. What can I do about it?

Query_time: 3.388929 Lock_time: 0.000003 Rows_sent: 22 Rows_examined: 1942746

use drpresso_ojs205;
SET timestamp=1702348013;
MAX(s.context_id) AS journal_id,
MAX(i.date_published) AS i_pub,
MAX(p.date_published) AS s_pub,
COUNT(*) AS count
submissions s
JOIN publications p ON (p.publication_id = s.current_publication_id)
JOIN publication_settings ps ON (ps.publication_id = p.publication_id AND ps.setting_name=‘issueId’ AND ps.locale=‘’)
JOIN issues i ON (CAST(i.issue_id AS CHAR(20)) = ps.setting_value AND i.journal_id = s.context_id)
JOIN submission_search_objects o ON (s.submission_id = o.submission_id)
NATURAL JOIN submission_search_object_keywords o0 NATURAL JOIN submission_search_keyword_list k0
s.status = 3 AND
i.published = 1 AND k0.keyword_text = ‘services’ AND i.journal_id = 6
GROUP BY o.submission_id
LIMIT 500;

And the Server Information

|Setting Name|Setting Value|
|OS platform|Linux|
|PHP version|8.2.13|
|Apache version|LiteSpeed|
|Database driver|mysql|
|Database server version|8.0.35-cll-lve|

Hi @LucyDRP,

This query is caused by requests for search results in OJS. I’d suggest reviewing your access log for requests to the search endpoint, to see if there is a large amount of volume there e.g. coming from search engines. It might be possible to ask them to throttle their requests using a robots.txt file; see e.g.:

Alec Smecher
Public Knowledge Project Team

1 Like

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