setting ulimit and ubuntu 8.04
- by Wizzard
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.