Log in

View Full Version : raising max_user_connections?



Demonicman
10-11-2010, 04:20 AM
Ok so I am constantly having people tell me they are getting an error saying something about exceeding the max user connections. This is because when I first made my website I did not know about closing connections properly, so there are just wayyy too many connections I would have to close in coding for it to be worth my time. Right now, using Byethost, their MySQL server allows up to 10 max_user_connections. I want to get a new server so I can start having many people online at once, at least 50, but there is no way for me to raise the max connections since the MySQL server belongs to Byethost. Is there a website where I can buy into a MySQL server allowing more max_user_connections, or do I have to own my own MySQL server (gosh that would be costly). I am pretty sure I read something about using a VPS for MySQL but I am not quite sure about how all of this goes together. I wish I could just buy more max_user_connections to make it easy for me... All I want to do is raise my max_user_connections, however it can be done. Anyone have any info on that for me?

traq
10-11-2010, 04:55 AM
you might be able to do so using a php.ini file, though your host can still override this (and most do). It would be much better to clean out your code, especially if you're moving to a new server anyway - having too many open connections can seriously affect performance.

Demonicman
10-11-2010, 05:27 AM
no go on the php.ini... its nowhere to be found so i cant edit it

editing this code would take way too much time... i doubt i could even find all of the spots where i would have to close the connections

traq
10-11-2010, 01:18 PM
if you can't find php.ini:

a) you don't have one yet; create one. there are plenty of tutorials out there.
b) your host doesn't allow you to use it (quite possible).

Most text editors have a "search" function that would help you find every instance where you open a DB connection.