MySQL 5.5 – Fix Crashing After Refreshing Web Page Rapidly

amazon ec2MySQLmysql-5.5Wordpress

I am using ec2 aws instance for my wordpress webiste.after every 5 to 10 minute and randomly my website going down i tried lots of things like increasing buffer memory ,memory limit but that not working for me so any one know how do i resolve this issue bellow snpiet is the error log

Mysqld log :- http://pastebin.com/8Gp0V5g3

error log:- http://pastebin.com/cpEHHUwm

160201 14:44:06 [Warning] /usr/libexec/mysql55/mysqld: Forcing close of thread 104  user: 'wordpress2'

160201 14:44:06 [Warning] /usr/libexec/mysql55/mysqld: Forcing close of thread 73  user: 'wordpress2'

160201 14:44:06  InnoDB: Starting shutdown...
160201 14:44:07  InnoDB: Shutdown completed; log sequence number 2756685
160201 14:44:07 [Note] /usr/libexec/mysql55/mysqld: Shutdown complete

160201 14:44:07 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
160201 14:44:08 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160201 14:44:08 [Note] /usr/libexec/mysql55/mysqld (mysqld 5.5.46) starting as process 14406 ...
160201 14:44:08 [Note] Plugin 'FEDERATED' is disabled.
160201 14:44:08 InnoDB: The InnoDB memory heap is disabled
160201 14:44:08 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160201 14:44:08 InnoDB: Compressed tables use zlib 1.2.8
160201 14:44:08 InnoDB: Using Linux native AIO
160201 14:44:08 InnoDB: Initializing buffer pool, size = 128.0M
160201 14:44:08 InnoDB: Completed initialization of buffer pool
160201 14:44:08 InnoDB: highest supported file format is Barracuda.
160201 14:44:08  InnoDB: Waiting for the background threads to start
160201 14:44:09 InnoDB: 5.5.46 started; log sequence number 2756685
160201 14:44:09 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
160201 14:44:09 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
160201 14:44:09 [Note] Server socket created on IP: '0.0.0.0'.
160201 14:44:09 [Note] Event Scheduler: Loaded 0 events
160201 14:44:09 [Note] /usr/libexec/mysql55/mysqld: ready for connections.
Version: '5.5.46'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)

show full table wp_options as bellow:-

wp_options

my.cnf file setting in /etc/my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mysqld according to the
# instructions in http://fedoraproject.org/wiki/Systemd
#max_connections = 1000
#wait_timeout = 120
#interactive_timeout = 120
#max_allowed_packet = 64M
#innodb_buffer_pool_size = 800M
#innodb_buffer_pool_size = 384M
#max_user_connections = 500
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

error after refreshing the page rapidly.
after refreshing

User privileges wordpress user as bellow:-
user

Connection's:-

connections

Best Answer

This sound like a (probably) badly written wordpress plugin.

If you have installed some plugins, especially if these are not rated or newest release, try to deactivate it one by one and do a test for each deactivation (if you want first backup the database and httpd wordpress dir, but normally on the deactivation process this is not required)

Also check the "wordpress2" user grants in order to find some restriction like max_user_connections XXX, in order to do this connect as a root to your mysql console than:

select user, host, max_user_connections from mysql.user where `user`= 'wordpress2';