Edit /etc/my.cnf, /etc/mysql/my.cnf or /etc/my.cnf.d/server.cnf and add the following lines to the [mysqld] section:
expire_logs_days = 7 innodb_log_file_size = 64M max_connections = 1000 max_user_connections = 990 net_write_timeout = 28800 query-cache-size = 256M wait_timeout = 172800
In addition, add the following line to the [mysqld] section on larger systems (1000 concurrent calls or more) if memory allows:
innodb_buffer_pool_size = 20G
Add this line to the [mysqld_safe] section:
open-files-limit = 65535