reduce mysql connections

How can i disable time a mysql is alive?
The problem is that too many mysql connection make my system go down.
System has 512 mb Ram.



Well, if the connections are active connections – that is, if MySQL is doing something – it could be an issue with the apps being run on your server. You may need to figure out what exactly they’re doing and why it’s taking so long.

However, you can certainly play with some of the timeout settings that MySQL offers. You can see a list of system variables here:

You may want to look at “wait_timeout” and “connect_timeout”, for starters.