High database requests parameters


I’m running easy engine on a huge Digital Ocean VPS, I’ve set pm.max_children in php-fpm.d/easyengine.conf considering the amoung of RAM available, but I’d also like to increase number of connections that can be handled by mariadb.
We’re expecting a few hundred visitors simultaneously.

Any tips or resources on this?

Thank you!

I would take a look at the settings in the my.cnf file and tune and optimize for your server.

Typically found in /etc/mysql/my.cnf which is /opt/easyengine/services/mariadb/conf/my.cnf on EEv4. If you are using an older version of EE, then check /etc/mysql/conf.d/my.cnf first.

Your primary settings will be related to the following:

Make copies of any files prior to changing. Optimizing mysql servers is a complex task. I have used perl scripts in the past such as MySQLTuner (https://github.com/major/MySQLTuner-perl) to assist with choosing good settings. Note that if you are using EEv4 or any Dockerized mysql instance, you will have to take extra steps to use the MySQLTuner script.

Of those settings above, focus on max_connections and key_buffer. key_buffer is the setting that I find most affects the speed of the mysql service with respect to the amount of resources available, such as RAM.

There is ample documentation on the web that explains each of the my.cnf settings. Please research each setting before making wholesale changes.

EDIT: Just realized this was in the handbook. https://easyengine.io/handbook/how-to-use-mysqltuner-with-ee4/

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.