Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
2.1k views
in Q2A Core by
Hello

At the rush hour of the traffic the website shows the following error

 

Could not establish database connection. Please check the username, password and hostname in the config file, and if necessary set up the appropriate MySQL user and privileges.

 I migrate the website from 4 GB RAM hosting to 8GB

Then I faced the same issue I did migrate the website to 64GB RAM hosting and still I face the same error

I increased the max_connections from 151 to 1000 but I still get the same error
Q2A version: 1.7.2
by
What does it say in your server MySQL logs?
by
cat /var/lib/mysql/svr.******.com.err

151227 21:22:39 [Warning] IP address '118.193.132.5' could not be resolved: Name or service not known
151228  4:19:50 [Warning] IP address '222.186.30.215' could not be resolved: Name or service not known
151228  8:28:55 [Warning] IP address '58.96.176.45' could not be resolved: Name or service not known
151228 12:02:48 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYybBHUV' (Errcode: 28)
151228 12:05:44 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYZUC1Gz' (Errcode: 28)
151228 12:06:50 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MY4CYZpd' (Errcode: 28)
151228 12:08:18 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MY2MyJvE' (Errcode: 28)
151228 12:08:40 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYN3LKE3' (Errcode: 28)
151228 13:05:08 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYXxMxng' (Errcode: 28)
151228 13:09:10 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYRgE1oP' (Errcode: 28)
151228 13:09:31 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MY6uGPlJ' (Errcode: 28)
151228 13:11:43 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYQsFIqK' (Errcode: 28)
151228 13:12:49 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYqFfE9O' (Errcode: 28)
151228 13:13:34 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MY4v6XIo' (Errcode: 28)
151228 16:35:30 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYynmGXt' (Errcode: 28)
151228 16:35:41 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MY36V7CP' (Errcode: 28)
151228 16:36:25 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYs6mzKS' (Errcode: 28)
151228 16:36:47 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYJc8FBK' (Errcode: 28)
151228 16:38:15 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MY0n8jLy' (Errcode: 28)
151228 16:39:44 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYorBWuR' (Errcode: 28)
151228 16:40:28 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYni9CIQ' (Errcode: 28)
151228 16:41:34 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MY9Hj1Fd' (Errcode: 28)
151228 16:45:25 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYVd7XuQ' (Errcode: 28)
151228 16:47:15 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYBSdrQ2' (Errcode: 28)
151228 16:47:37 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYqQUaXp' (Errcode: 28)
151228 16:47:48 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYKQsW7r' (Errcode: 28)
151228 16:50:22 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYgXcLtX' (Errcode: 28)
151228 16:50:44 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYVezknO' (Errcode: 28)
151228 16:51:28 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYlKsdPm' (Errcode: 28)
151228 16:51:50 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MY78m6ei' (Errcode: 28)
151228 16:52:12 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MY3C43zy' (Errcode: 28)
151228 16:52:45 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYmGBe3Q' (Errcode: 28)
151228 16:55:52 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYN1pkmZ' (Errcode: 28)
151228 16:58:15 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MY37NI8y' (Errcode: 28)
151228 16:59:32 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYL42Yca' (Errcode: 28)
151228 16:59:43 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYbw24l9' (Errcode: 28)
151228 17:41:53 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYMDOsgq' (Errcode: 28)
151228 17:44:31 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYirE3wL' (Errcode: 28)
151228 17:44:38 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MY0y4ZHr' (Errcode: 28)
151228 17:45:22 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYCYcCnQ' (Errcode: 28)
151228 17:46:17 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYDl6F94' (Errcode: 28)
151228 17:47:12 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYFeNnod' (Errcode: 28)
151228 17:47:45 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYC2lBkn' (Errcode: 28)
151228 17:47:56 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYkgNw6c' (Errcode: 28)
151228 17:48:29 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYbEcE94' (Errcode: 28)
151228 17:51:03 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYAUea2p' (Errcode: 28)
151228 17:51:14 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MYcCZuxq' (Errcode: 28)
151228 17:51:25 [ERROR] /usr/sbin/mysqld: Sort aborted: Can't create/write to file '/tmp/MY07IfS6' (Errcode: 28)
151228 20:17:39 [Warning] IP address '222.186.30.119' could not be resolved: Name or service not known
151228 21:54:51 [Warning] IP address '118.192.148.71' could not be resolved: Name or service not known
151229 20:06:00 [Note] /usr/sbin/mysqld: Normal shutdown

151229 20:06:00 [Note] Event Scheduler: Purging the queue. 0 events
151229 20:06:02 [Warning] /usr/sbin/mysqld: Forcing close of thread 6317234  user: 'leechprotect'

151229 20:06:02 [Warning] /usr/sbin/mysqld: Forcing close of thread 1366155  user: 'eximstats'

151229 20:06:02  InnoDB: Starting shutdown...
151229 20:06:02  InnoDB: Waiting for 155 pages to be flushed
151229 20:06:03  InnoDB: Shutdown completed; log sequence number 3367220373
151229 20:06:03 [Note] /usr/sbin/mysqld: Shutdown complete

151229 20:06:03 mysqld_safe mysqld from pid file /var/lib/mysql/svr.******.com.pid ended
151229 20:07:58 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
151229 20:07:58 [Note] /usr/sbin/mysqld (mysqld 5.5.46-cll) starting as process 26305 ...
151229 20:07:58 [Note] Plugin 'FEDERATED' is disabled.
151229 20:07:58 InnoDB: The InnoDB memory heap is disabled
151229 20:07:58 InnoDB: Mutexes and rw_locks use GCC atomic builtins
151229 20:07:58 InnoDB: Compressed tables use zlib 1.2.3
151229 20:07:58 InnoDB: Using Linux native AIO
151229 20:07:58 InnoDB: Initializing buffer pool, size = 128.0M
151229 20:07:58 InnoDB: Completed initialization of buffer pool
151229 20:07:58 InnoDB: highest supported file format is Barracuda.
151229 20:07:58  InnoDB: Waiting for the background threads to start
151229 20:07:59 InnoDB: 5.5.46 started; log sequence number 3367225752
151229 20:07:59 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
151229 20:07:59 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
151229 20:07:59 [Note] Server socket created on IP: '0.0.0.0'.
151229 20:07:59 [Note] Event Scheduler: Loaded 0 events
151229 20:07:59 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.46-cll'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
151229 20:19:00 [Note] /usr/sbin/mysqld: Normal shutdown
by
151229 20:19:02  InnoDB: Starting shutdown...
151229 20:19:04  InnoDB: Shutdown completed; log sequence number 3370813419
151229 20:19:04 [Note] /usr/sbin/mysqld: Shutdown complete

151229 20:19:04 mysqld_safe mysqld from pid file /var/lib/mysql/svr.******.com.pid ended
151229 20:20:58 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
151229 20:20:58 [Note] /usr/sbin/mysqld (mysqld 5.5.46-cll) starting as process 19838 ...
151229 20:20:58 [Note] Plugin 'FEDERATED' is disabled.
151229 20:20:58 InnoDB: The InnoDB memory heap is disabled
151229 20:20:58 InnoDB: Mutexes and rw_locks use GCC atomic builtins
151229 20:20:58 InnoDB: Compressed tables use zlib 1.2.3
151229 20:20:58 InnoDB: Using Linux native AIO
151229 20:20:58 InnoDB: Initializing buffer pool, size = 128.0M
151229 20:20:58 InnoDB: Completed initialization of buffer pool
151229 20:20:58 InnoDB: highest supported file format is Barracuda.
151229 20:20:58  InnoDB: Waiting for the background threads to start
151229 20:20:59 InnoDB: 5.5.46 started; log sequence number 3370825504
151229 20:20:59 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
151229 20:20:59 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
151229 20:20:59 [Note] Server socket created on IP: '0.0.0.0'.
151229 20:20:59 [Note] Event Scheduler: Loaded 0 events
151229 20:20:59 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.46-cll'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
151229 20:25:23 [Warning] IP address '58.220.21.107' could not be resolved: Name or service not known
151229 20:58:27 [Note] /usr/sbin/mysqld: Normal shutdown

151229 20:58:27 [Note] Event Scheduler: Purging the queue. 0 events
151229 20:58:29 [Warning] /usr/sbin/mysqld: Forcing close of thread 44315  user: 'eximstats'

151229 20:58:29  InnoDB: Starting shutdown...
151229 20:58:29  InnoDB: Waiting for 201 pages to be flushed
151229 20:58:30  InnoDB: Shutdown completed; log sequence number 3428905201
151229 20:58:30 [Note] /usr/sbin/mysqld: Shutdown complete

151229 20:58:30 mysqld_safe mysqld from pid file /var/lib/mysql/svr.******.com.pid ended
151229 20:58:30 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
151229 20:58:30 [Note] /usr/sbin/mysqld (mysqld 5.5.46-cll) starting as process 3623 ...
151229 20:58:30 [Note] Plugin 'FEDERATED' is disabled.
151229 20:58:30 InnoDB: The InnoDB memory heap is disabled
151229 20:58:30 InnoDB: Mutexes and rw_locks use GCC atomic builtins
151229 20:58:30 InnoDB: Compressed tables use zlib 1.2.3
151229 20:58:30 InnoDB: Using Linux native AIO
151229 20:58:30 InnoDB: Initializing buffer pool, size = 128.0M
151229 20:58:30 InnoDB: Completed initialization of buffer pool
151229 20:58:30 InnoDB: highest supported file format is Barracuda.
151229 20:58:30  InnoDB: Waiting for the background threads to start
151229 20:58:31 InnoDB: 5.5.46 started; log sequence number 3428905201
151229 20:58:31 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
151229 20:58:31 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
151229 20:58:31 [Note] Server socket created on IP: '0.0.0.0'.
151229 20:58:31 [Note] Event Scheduler: Loaded 0 events
151229 20:58:31 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.46-cll'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
151229 21:04:57 [Note] /usr/sbin/mysqld: Normal shutdown

151229 21:04:57 [Note] Event Scheduler: Purging the queue. 0 events
151229 21:04:58 [ERROR] /usr/sbin/mysqld: Sort aborted: Query execution was interrupted
151229 21:04:59  InnoDB: Starting shutdown...
151229 21:05:00  InnoDB: Waiting for 33 pages to be flushed
151229 21:05:00  InnoDB: Shutdown completed; log sequence number 3430633521
151229 21:05:00 [Note] /usr/sbin/mysqld: Shutdown complete

151229 21:05:00 mysqld_safe mysqld from pid file /var/lib/mysql/svr.******.com.pid ended
151229 21:05:01 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
151229 21:05:01 [Note] /usr/sbin/mysqld (mysqld 5.5.46-cll) starting as process 25870 ...
151229 21:05:01 [Note] Plugin 'FEDERATED' is disabled.
151229 21:05:01 InnoDB: The InnoDB memory heap is disabled
151229 21:05:01 InnoDB: Mutexes and rw_locks use GCC atomic builtins
151229 21:05:01 InnoDB: Compressed tables use zlib 1.2.3
151229 21:05:01 InnoDB: Using Linux native AIO
151229 21:05:01 InnoDB: Initializing buffer pool, size = 128.0M
151229 21:05:01 InnoDB: Completed initialization of buffer pool
151229 21:05:01 InnoDB: highest supported file format is Barracuda.
151229 21:05:01  InnoDB: Waiting for the background threads to start
151229 21:05:02 InnoDB: 5.5.46 started; log sequence number 3430633521
151229 21:05:02 [ERROR] /usr/sbin/mysqld: unknown variable 'imax_connections=1500'
151229 21:05:02 [ERROR] Aborting

151229 21:05:02  InnoDB: Starting shutdown...
151229 21:05:03  InnoDB: Shutdown completed; log sequence number 3430633521
151229 21:05:03 [Note] /usr/sbin/mysqld: Shutdown complete

151229 21:05:03 mysqld_safe mysqld from pid file /var/lib/mysql/svr.******.com.pid ended
151229 21:05:38 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
151229 21:05:38 [Note] /usr/sbin/mysqld (mysqld 5.5.46-cll) starting as process 30626 ...
151229 21:05:38 [Note] Plugin 'FEDERATED' is disabled.
151229 21:05:38 InnoDB: The InnoDB memory heap is disabled
151229 21:05:38 InnoDB: Mutexes and rw_locks use GCC atomic builtins
151229 21:05:38 InnoDB: Compressed tables use zlib 1.2.3
151229 21:05:38 InnoDB: Using Linux native AIO
151229 21:05:38 InnoDB: Initializing buffer pool, size = 128.0M
151229 21:05:38 InnoDB: Completed initialization of buffer pool
151229 21:05:38 InnoDB: highest supported file format is Barracuda.
151229 21:05:38  InnoDB: Waiting for the background threads to start
151229 21:05:39 InnoDB: 5.5.46 started; log sequence number 3430633521
151229 21:05:39 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
151229 21:05:39 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
151229 21:05:39 [Note] Server socket created on IP: '0.0.0.0'.
151229 21:05:39 [Note] Event Scheduler: Loaded 0 events
151229 21:05:39 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.46-cll'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
151229 21:06:05 [Note] /usr/sbin/mysqld: Normal shutdown

151229 21:06:05 [Note] Event Scheduler: Purging the queue. 0 events
151229 21:06:07  InnoDB: Starting shutdown...
151229 21:06:08  InnoDB: Shutdown completed; log sequence number 3431203785
151229 21:06:08 [Note] /usr/sbin/mysqld: Shutdown complete

151229 21:06:08 mysqld_safe mysqld from pid file /var/lib/mysql/svr.******.com.pid ended
151229 21:06:09 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
151229 21:06:09 [Note] /usr/sbin/mysqld (mysqld 5.5.46-cll) starting as process 5786 ...
151229 21:06:09 [Note] Plugin 'FEDERATED' is disabled.
151229 21:06:09 InnoDB: The InnoDB memory heap is disabled
151229 21:06:09 InnoDB: Mutexes and rw_locks use GCC atomic builtins
151229 21:06:09 InnoDB: Compressed tables use zlib 1.2.3
151229 21:06:09 InnoDB: Using Linux native AIO
151229 21:06:09 InnoDB: Initializing buffer pool, size = 128.0M
151229 21:06:09 InnoDB: Completed initialization of buffer pool
151229 21:06:09 InnoDB: highest supported file format is Barracuda.
151229 21:06:09  InnoDB: Waiting for the background threads to start
151229 21:06:10 InnoDB: 5.5.46 started; log sequence number 3431203785
151229 21:06:10 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
151229 21:06:10 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
151229 21:06:10 [Note] Server socket created on IP: '0.0.0.0'.
151229 21:06:10 [Note] Event Scheduler: Loaded 0 events
151229 21:06:10 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.46-cll'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL
by
Community Server (GPL)
151229 21:17:48 [Note] /usr/sbin/mysqld: Normal shutdown

151229 21:17:48 [Note] Event Scheduler: Purging the queue. 0 events
151229 21:17:48 [ERROR] /usr/sbin/mysqld: Sort aborted: Query execution was interrupted
151229 21:17:50 [Warning] /usr/sbin/mysqld: Forcing close of thread 13511  user: 'eximstats'

151229 21:17:50  InnoDB: Starting shutdown...
151229 21:17:51  InnoDB: Waiting for 201 pages to be flushed
151229 21:17:52  InnoDB: Shutdown completed; log sequence number 3448949301
151229 21:17:52 [Note] /usr/sbin/mysqld: Shutdown complete

151229 21:17:52 mysqld_safe mysqld from pid file /var/lib/mysql/svr.******.com.pid ended
151229 21:17:52 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
151229 21:17:52 [Note] /usr/sbin/mysqld (mysqld 5.5.46-cll) starting as process 29150 ...
151229 21:17:52 [Note] Plugin 'FEDERATED' is disabled.
151229 21:17:52 InnoDB: The InnoDB memory heap is disabled
151229 21:17:52 InnoDB: Mutexes and rw_locks use GCC atomic builtins
151229 21:17:52 InnoDB: Compressed tables use zlib 1.2.3
151229 21:17:52 InnoDB: Using Linux native AIO
151229 21:17:52 InnoDB: Initializing buffer pool, size = 128.0M
151229 21:17:52 InnoDB: Completed initialization of buffer pool
151229 21:17:52 InnoDB: highest supported file format is Barracuda.
151229 21:17:53  InnoDB: Waiting for the background threads to start
151229 21:17:54 InnoDB: 5.5.46 started; log sequence number 3448949301
151229 21:17:54 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
151229 21:17:54 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
151229 21:17:54 [Note] Server socket created on IP: '0.0.0.0'.
151229 21:17:54 [Note] Event Scheduler: Loaded 0 events
151229 21:17:54 [Note] /usr/sbin/mysqld: ready for connections.

1 Answer

0 votes
by

According to this, the error you're getting (errcode 28) means that the disk is full. So I think you might need to increase disk space rather than RAM.

by
I see the disk space is not full
Please click the link to see my disk space then tell me if need to increase
http://prntscr.com/9kbjm0
by
And this is my hosting provider suggestion :

It appears the following table is causing these queries:
###################
+---------------+-------------+-----------+--------------+------------------------+
| TABLE_SCHEMA | TABLE_NAME | ROWS_READ | ROWS_CHANGED | ROWS_CHANGED_X_INDEXES |
+---------------+-------------+-----------+--------------+------------------------+
| isalna_isalna | qa_eventlog | 189416452 | 0 | 0 |
+---------------+-------------+-----------+--------------+------------------------+
###################

This table looks to be tracking visitors to the site. This type of activity normally causes these types of high load issues and we recommend against using this. Turning off the visitor tracking should help reduce the overall stress on the server and allow services to operate normally.
by
You can turn that off in Admins > Plugins, click 'options' on Event Logger plugin and untick the boxes.
...