[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ulimit for mysql and www-data



  I had the same problem (with apache) , and found that the best way is to
add
ulimit -n 32000
ulimit -u 2048
at the begining of /etc/init.d/apache
And I think that is the best way to do it.

sometning like /etc/rc.boot/ulimit_optimize possibly won't work, because
limits are inherited through fork() , and to execute your script, the init
fork()s,exec() your script,the parent waits for the end of it's
execution, and then continues, so he shouldn't see the change in the
limits.

(sorry for my rusty english :) )

On Wed, 26 Dec 2001, Patrick Hsieh wrote:

> Hello list,
>
> I am running a dedicated apache/php/mysql website on Debian 3.0(woody).
> MySQL server runs as "mysql" uid; Apache "www-data". It seems that the
> default ulimit value does not meet the requirement as a dedicated machine.
> The Debian GNU/Linux box ships dual PentiumIII-1G with 1G RAM. I am planing
> to optimize the ulimit value for "www-data" and "mysql", any suggestions?
>
> BTW, I am planing to put some optimization scripts under /etc/rc.boot, say
> /etc/rc.boot/fs_optimize
> (tuning /proc/sys/fs/*)
>
> /etc/rc.boot/ulimit_optimize
> (tuning ulimit stuff)
>
> Is it a good way to put ulimit adjustments for www-data and mysql in
> /etc/rc.boot/ulimit_optimize so that it works upon boot time?
>
> Any suggestions appreciated.



Reply to: