Richard G
Verified User
On two of the servers, once a while the mysql server hangs. It's running but connections are not possible anymore.
So I had a look in the error log and it contains a lot of these lines just before it hangs:
No problem on the other servers. This is the server's my.cnf (same as on every other server):
So I checked the open files setting.
Doesn't look too bad does it? Or is 1024 very little?
Checked the same in the mysql process:
So what exactly needs adjustment, and why only on two servers?
The other server has 32768 on "max locked memory" by the way.
So I had a look in the error log and it contains a lot of these lines just before it hangs:
[ERROR] Error in accept: Too many open files
No problem on the other servers. This is the server's my.cnf (same as on every other server):
Code:
[mysqld]
local-infile=0
bind-address = 127.0.0.1
default-storage-engine=MyISAM
innodb_file_format=Barracuda
innodb_file_per_table=1
So I checked the open files setting.
Code:
mysql> show global variables like 'open%'
-> ;
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| open_files_limit | 1024 |
+------------------+-------+
1 row in set (0.00 sec)
Doesn't look too bad does it? Or is 1024 very little?
Checked the same in the mysql process:
Code:
root@serverxx /proc # cat /proc/16496/limits
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 10485760 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 95088 95088 processes
Max open files 1024 4096 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 95088 95088 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
So what exactly needs adjustment, and why only on two servers?
The other server has 32768 on "max locked memory" by the way.