Submitted by paulfromsurrey on Sun, 01/22/2017 - 17:11 Pro Licensee
mysql getting error too many connections error #1040
id and password is right when we try to login in it is letting database to connect
website works and then stop
something is not right with mysql
Please help
Status:
Active
Comments
Submitted by paulfromsurrey on Sun, 01/22/2017 - 18:37 Pro Licensee Comment #1
mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock
symbolic-links=0 innodb_file_per_table = 1 thread_concurrency = 8 query_cache_size = 32M thread_cache_size = 8 myisam_sort_buffer_size = 64M read_rnd_buffer_size = 8M read_buffer_size = 2M sort_buffer_size = 2M table_open_cache = 512 max_allowed_packet = 1M key_buffer_size = 384M
[mysqld_safe] log-error=/var/log/mariadb/mariadb.log pid-file=/var/run/mariadb/mariadb.pid
!includedir /etc/my.cnf.d
Submitted by andreychek on Sun, 01/22/2017 - 21:55 Comment #2
Howdy -- the error you mentioned indicates that MySQL has too many open connections.
That could be due to a web app or plugin not properly closing database connections, or it could be that one website in particular is receiving quite a bit of traffic.
One way to resolve that would be to increase how many connections MySQL will accept.
To do that, open /etc/mysql/my.cnf, look for the "[mysqld]" section, and in there add this line:
max_connections = 500
After adding that, restart MySQL, and then see if your websites are working again.