In CentOS 6.3/MySQL 5.1.67 I had an user that runs wordpress reaching its OS space quota (mostly files, the DB is less than 100Mb). When the user tried to create a post it triggered an
[ERROR] /usr/libexec/mysqld: Table './site/wp_posts' is marked as crashed and should be repaired. That is understandable and easily fixed. What I didn't get is why this condition made MySQL reach "too many connections" (which naturally brought down all other applications that used the same MySQL server).
I would also like to know, if possible, how to avoid this in the future. The server has plenty of RAM. My.cnf follows:
[mysqld] local-infile=0 datadir = /var/lib/mysql socket = /var/lib/mysql/mysql.sock user=mysql symbolic-links=0 innodb_file_per_table = 1 thread_concurrency = 8 thread_cache_size = 8 myisam_sort_buffer_size = 64M read_rnd_buffer_size = 8M read_buffer_size = 2M sort_buffer_size = 2M table_cache = 768 max_allowed_packet = 1M key_buffer = 384M query_cache_size = 24M join_buffer_size = 262144 innodb_buffer_pool_size = 3G log_bin = /var/log/mysql/mysql-bin.log expire_logs_days = 8 max_binlog_size = 256M log-slow-queries log-queries-not-using-indexes sync_binlog = 3 innodb_flush_log_at_trx_commit = 3 table_definition_cache = 768 bind-address = 127.0.0.1 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid log-warnings=2