Greetings,

I've set the table_cache variable in /etc/mysql/my.cnf on Ubuntu to 512, but the reported value is only 64. How can I fix this?

Thanks

link|improve this question

I presume you restarted MySQL? And the line in /etc/mysql/my.cnf says "table_cache = 512"? – Janne Pikkarainen Oct 20 '10 at 12:47
This is correct, yes. – kobrien Oct 20 '10 at 13:58
feedback

1 Answer

up vote 1 down vote accepted

table_cache increases the amount of file descriptors that mysqld requires. This is a system limitation, which can also be limited in MySQL with the open-files-limit configuration option.

To see the current system wide limitation in Linux you can run cat /proc/sys/fs/file-max. This can also be limited on a per-user basis using ulimit -n.

If file descriptors are not the issue and you configured the setting correctly, MySQL could be using a different my.cnf. Look at the processlist, where the --defaults-extra-file could specify the cnf. Also, if unspecified the --datadir is often where the my.cnf can live.

You could also search the filesystem for additional my.cnf files.

link|improve this answer
Thanks, I'll give it a go. ( I'll vote this up when I have enough rep ) – kobrien Oct 20 '10 at 19:02
Assuming this addresses your issue @kobrien, you can click the check mark to accept the answer. Thanks! – Warner Oct 20 '10 at 19:19
I'll get to test this in the morning, I'll accept right afterwards if it works. :) – kobrien Oct 20 '10 at 21:47
Still haven't gotten around to testing this. Don't worry, I haven't forgotten. :) – kobrien Oct 26 '10 at 23:34
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.