MySQL overload at 100% CPU OJS3.3.0.17

We have OJS 3.3.0.17 on a server with 8 cores, 12GB of RAM, and 512GB of storage dedicated exclusively to OJS. We host 19 journals and over 800 articles.

At certain times of day, the CPU usage reaches 100%, rendering OJS inaccessible for obvious reasons. When running the top command in Ubuntu, the mysqld process handles a significant portion of this load, nearly 400%.

Running SHOW FULL PROCESSLIST in MySQL yields a query that takes 25 seconds, examines over 8 million records, and uses 208. The query and its results are provided below.


Tenemos OJS3.3.0.17 en un servidor con 8 núcleos, 12GB RAM y 512GB de uso exclusivo para OJS, tenemos 19 revistas y más de 800 artículos.

En ciertas horas del día, el CPU se sobrecarga al 100% y deja inabilitado el acceso al OJS por obvias razones. Al ejecutar el comando top en Ubuntu, el proceso mysqld se lleva gran parte de esa carga, casi 400%.

Al ejectura SHOW FULL PROCESSLIST en mysql se encuentra esta consulta que demora 25 segundos, examina más de 8 millones de registros y utiliza 208. Les dejo la consulta y el resultado

SELECT v.* FROM versions v LEFT JOIN plugin_settings ps ONlower(v.product_class_name) = ps.plugin_nameAND ps.setting_name = ‘enabled’ AND (context_id = 4 OR v.sitewide = 1)WHERE v.current = 1 AND (ps.setting_value = ‘1’ OR v.lazy_load <> 1);

Time: 2026-04-09T21:41:06.479218Z
User@Host: usuariobd[usuariobd] @ localhost   Id:   730
Query_time: 25.765041  Lock_time: 0.000033 Rows_sent: 208  Rows_examined: 8113317
SET timestamp=1775770840;

Ayuda por favor.

Hi!

This query shouldn’t be problematic, please share the output of:

SELECT (SELECT COUNT(0) FROM versions), (SELECT COUNT(0) FROM plugin_settings)

Even with 19 journals, it’s very unlikely to have so many records in these tables.

Best,
Jonas Raoni

I’ll be waiting for your reply (regarding the message above), but in advance I advice you to:

  • Access the list of plugins and ensure the plugins starting with the title Recommeded by... are disabled, they are currently not performing very well on large installations and need to be improved.
  • Try these plugins:

Best,
Jonas Raoni

We had comparable issues with MySQL processes running endlessly (over months). Apart from the plugins mentioned by @jonasraoni we found AI search requests with more than 20 parameters to be responsible.
OJS 3.3 doesn’t handle those very well (natural joins for each of those parameters resulting in huge tables essentially blocking the server). We restricted the SQL max processing time to kill processes exceeding a certian time limit.

@mejiamariod

Si miras el LOG de errores, seguramente son escaneos de bots, una solución es la que menciona @jonasraoni , usar el plugin de Cache, eso mejorará mucho el rendimiento de tu sitio y si tienes bots de IA usa el plugin de fulTextSearch igual de Jonas que mejora el buscador del OJS.
Pruébalo y nos cuentas.
Saludos!

Hi and thanks.

This is the result:

Thanks @jonasraoni

I’ll run some tests with those plugins. I have detected quite a few visits from bots and AI bots. I temporarily disabled scheduled tasks, although it’s not the best approach, but it has remained stable while I’ve been running some tests.


Realizaré pruebas con esos plugins. Si he detectado bastantes visitas de bots y IA bots. Temporalmente desactivé las tareas programadas, aunque no es lo correcto, se ha mantenido estable mientras realizo algunas pruebas.

I’ll close this topic, if you’re still have issues you might open a new topic. Bots can really hurt your server, the plugins I’ve mentioned will help, but you’ll need to add something in front of your server to block bad bots/rate limit requests.

Best,
Jonas Raoni