-   Linux - Server (
-   -   Debian and ulimits (

circus78 02-28-2012 08:55 AM

Debian and ulimits
Hi all,

I need to tune my web server (Debian squeeze 64bit, Apache-worker, MySQL).
During bechmark test, I got this kind of error:


[Mon Feb 27 17:04:22 2012] [alert] (11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread
[Mon Feb 27 17:04:22 2012] [apc-error] apc_mmap: mmap failed: Cannot allocate memory
Out of memory (Needed 593128 bytes)
[apc-error] apc_mmap: mmap failed: Cannot allocate memory
So I think I must increase some limits of www-data user.
I put this in /etc/security/limits.conf:


@www-data hard nproc 0
but if I do:

su - www-data
ulimit -a

I don't see any difference.
What is the correct way to adjust those settings for Apache user in Debian?

Satyaveer Arya 02-28-2012 09:32 AM

You may need to install LSWS(Lite Speed Web Server) with root user in order to lift the memory limit imposed by the OS by default.

After that try "ulimit -a", raise the memory then start LSWS, see if it helps.

All times are GMT -5. The time now is 07:01 AM.