nibb
Oct 28 2005, 07:42 PM
Hi, is there a way using plesk that MYSQL databases have a limit on simultaneos connections. I know some webhosts do this to limit connections to databases. I think i will need to do this, because i have only a few clients but traffic is not balanced beetween them. So have 0 traffic but then some users have forums,wich sucks all database connections. On single user with a forum that has 80 simultaneos users can leave the server without connections. I have set the simulteanos connections higher every time on MYSQL but that is not the solution, a server will not handle xxx connections. Everything has a limit. So i was thinking of putting a limit per database or per account. Are you a webhost? How do you limit these clients that are heavy traffic with databases. Most script know requires MYSQL, and website with tons of traffic is just not $$$ having it on the server. But know more and more clients that sign up are just these type of clients, and i cant reject users because they have forums for example. I really have a ? on my head about how do others users of The planet that are webhost handle this. If someone can comment on this it would be nice since i really plan on buy more server but this is my biggest problem know. Too many connections to database.
kfukasawa
Oct 30 2005, 03:47 PM
QUOTE
You can add the following line to your MySQL configuration (/etc/my.cnf) file to set your maximum connections limit.
set-variable = max_connections=<# OF CONNECTIONS>
Doh!!! Sorry bout that. I mis-read your original post. Please ignore that.
Matt2k
Oct 30 2005, 04:24 PM
Franz Kafka!
Be careful if you get him pissed
Franz! Franz Kafka!
He'll smite you with metaphor fists!
Writing all he can, he's just a man
A warrior of words taking a stand
tekprio
Oct 30 2005, 04:55 PM
Perhaps the max_user_connections would be more appropriate for you. It limits the number of connections per user. Put the following in /etc/my.cnf
max_user_connections=20
You can change 20 to whatever limit is applicable for your server.
nibb
Oct 30 2005, 09:18 PM
The max_user_connections like you said could do it. Does this limit a specific user of a database ? Or connections per database itself?. The connections would be simultaneos ones right? Like max_user_connections=20 would limit to a max of 20 simultaneos users.
It would be nice if i can limit per domain, but if i can limit per database it oks too. For example every database can have only 20 simultaneos connections, this would be the same for users itself then right?
tekprio
Oct 30 2005, 11:53 PM
It is the limit of numer of simultaneous connections per user, not per domain nor per database. Usually, a domain may have multiple databases, and a database may have multple users. But in practice, you can find a reasonable limit and use that as a maximum connections allowed for your particular configuration.
nibb
Feb 27 2006, 12:37 AM
Are sure that works? I have set
set-variable=max_user_connections=xx
But i think its not affecting anything. I see forums on my server that still have over the limit i set.
kfukasawa
Feb 27 2006, 03:19 PM
What version of MySQL are you running?
nibb
Feb 27 2006, 03:23 PM
3.23.58 I think.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.