setting ulimit and ubuntu 8.04

Posted by Wizzard on Server Fault See other posts from Server Fault or by Wizzard
Published on 2009-12-11T00:22:25Z Indexed on 2010/03/30 12:03 UTC
Read the original article Hit count: 628

Filed under:
|
|
|

Hi there,

We have two ubuntu 8.04 servers. With the database server I set the table_cache to 1000 however when I restart mysql the status only shows 257 and the open files limit says 1024

I adjusted ulimit by doing ulimit -n 8192 and then restarting mysql; this seemed to do the tick however after a few hours I did ulimit -n and saw it had returned back to 1024

Bit of a worry.

I edited the /etc/security/limits.conf and added

mysql soft nofile 8192

mysql hard nofile 8192

then rebooted, no change. I then edited and change mysql to * rebooted, no change I then edited and changed it to one line

* - nofile 8192

and rebooted, no change.

cat /proc/sys/fs/file-max gives me 768730

sysctl fs.file-max gives me fs.file-max = 768730

I am at a bit of a loss to how I can set and keep the ulimit value set so I can increase the table cache properly on mysql.

© Server Fault or respective owner

Related posts about ulimit

Related posts about ubuntu