0

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

kobrien
  • 131
  • 10

1 Answers1

1

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.

Warner
  • 23,440
  • 2
  • 57
  • 69