MySQL max connections
3 posts by 2 authors in: Forums > CMS Builder
Last Post: May 15, 2014 (RSS)
By ht1080z - May 6, 2014
Hi,
I see in my cmsBuilder settings page under Server Info that my Database Server is MySQL v5.5.36 (Max Connections: 151).
What this max connection is exactly means and how can i change it?
Please advise,
Karls
By gregThomas - May 15, 2014
Hi Karls,
In a MySQL config file (it's location and name will be different depending on what OS/distribution it's installed on) there is a variable called max_connections that can be used to set the number of connections that can be made to the server at one time. When a user loads a PHP page that is connected to MySQL one connection will be used, and you can have up to 150 of these at one time. But the connection will be ephemeral, so in practice you can have far more than 150 PHP pages loading at the same time despite having max_connections set to 150.
If you're using a shared hosting service, it will be unlikely that you'll be able to change this variable yourself, but if you're on a cloud hosting service, you'll be able to edit it. If you change max_connections and have too many concurrent connections, you could run out of RAM, and this will cause performance and stability issues.
Thanks!
Greg
PHP Programmer - interactivetools.com