openemr / demo_farm_openemr

Demo farm for OpenEMR
GNU General Public License v3.0
4 stars 13 forks source link

increase max_connections in mysql #8

Closed bradymiller closed 7 years ago

bradymiller commented 7 years ago

will bring in the cnf file to mysql docker via volume so can modify settings as needed (note did not need to do it this way, just needed to modify the docker run command)

bradymiller commented 7 years ago

thought i had an easy fix here: https://github.com/openemr/demo_farm_openemr/commit/49b112f1144aa157c31fee4fc3c4b4fd61bbcba2

but mysql is capping the max_connections setting at 214 for some reason

bradymiller commented 7 years ago

--ulimit nofile=65536:65536 may be the answer

bradymiller commented 7 years ago

Now fixed, had to add both the max_connections setting and the --ulimit nofile=65536:65536 setting to the docker command: https://github.com/openemr/demo_farm_openemr/commit/49b112f1144aa157c31fee4fc3c4b4fd61bbcba2 https://github.com/openemr/demo_farm_openemr/commit/0ec8bb2b2bec188c107bcbf310129a271b0866a0

Gonna keep this open while monitoring how close the mysql docker gets to the max_connections via the following command (and will optimize the max_connections setting as needed): show status like '%onn%';

bradymiller commented 7 years ago

Been monitoring this and 180 has been the highest number of connections. And currently have the max set at 350, which is working out well (the more max connections can adversely affect performance, so 350 is working well for now). Will close this out now.