# Apache memory limits



## satanae (Nov 3, 2012)

Hi,
i search everywhere but cant find how to set max. memory limits for apache and mysql. Im running small VPS (1x 2,6Ghz, 1024RAM, FreeBSD 9) to serve few domains. When i open my page and holding F5 the httpd process takes all memory and start swaping - only think what can i do is hard reset. I try to set params in /etc/login.conf but it dont work:


```
www:\
	:stacksize=100m:\
	:memorylocked=100m:\
	:memoryuse=100m:\
	:maxproc=unlimited:\
	:sbsize=unlimited:\
	:vmemoryuse=100m:\
	:swapuse=100m:\
```

I also try to set in extras/httpd-default.conf:


```
TimeOut 60
KeepAlive on
MaxKeepAliveRequests 10
KeepAliveTimeout 3
```

How can i set max childs and memory limits? Can you recommend me these limits for my small VPS? Im  sorry for my bad english... Very thanks to all


----------

