Limit MySQL memmory usage ?

JAX

Verified User
Joined
Nov 7, 2005
Messages
13
Hello.

Is there any way that I can limit the memmory usage by MySQL ?
The server I am running has 512mb ram and I can see 10-15 mysql instances using up to 480mb ram.
How can I limit each session to let's say max 16mb ?

How can I be sure th MySQL is using /etc/my.conf and not some other conf file ?


Thank you in advance.
 
Ok , I can see there is a cnf file for the mysql.
Until now I had 512mb ram and I could see it was almost all used.
Now I added 512mb more and again , almost 98% of ram gets used.

Is there any way to limit the ram ammount the mysql will use because as far as I can se , more ram I add , more ram it uses.
 
Ok , I can see there is a cnf file for the mysql.
Until now I had 512mb ram and I could see it was almost all used.
Now I added 512mb more and again , almost 98% of ram gets used.

Is there any way to limit the ram ammount the mysql will use because as far as I can se , more ram I add , more ram it uses.
Post the content of your /etc/my.cnf file
It sounds that you either have Php/cgi/perl scripts that loop indefinitely exhausting MySQL resources. Adding these two directives to /etc/my.cnf might help:

max_connections=350
max_user_connections=25

Don't forget to restart MySQL. You'll have to see who is exhausting MySQL resources and fix their scripts.

Check out this thread for more information on HowTo optimize MySQL: http://www.directadmin.com/forum/showthread.php?t=132
 
Last edited:
Back
Top