yoshinorim / mha4mysql-manager

Development tree of Master High Availability Manager and tools for MySQL (MHA), Manager part
http://code.google.com/p/mysql-master-ha/
GNU General Public License v2.0
1.46k stars 501 forks source link

The app generates many files that are never closed in ubuntu 16.04. #117

Open aguzmans opened 5 years ago

aguzmans commented 5 years ago

Hi, I have been looking for a solution like yours for some time now. currently on my tests I am having this problem that the APP does not close some files it opens. I have had the application running since yesterday. check this out:

root@zaabix:~# ps aux |grep mast
root     21172  0.0  0.0  14224  1084 pts/0    S+   15:38   0:00 grep --color=auto mast
root     30636  0.4  9.3 448620 376408 pts/1   S+   Jan29   5:29 perl /usr/bin/masterha_manager --conf=/etc/app1.cnf
root@zaabix:~#

Then this is how many files the software is using right now:

root@zaabix:~# lsof -p 30636 |wc -l
27279
root@zaabix:~#

lsof also show what those files are:

# lsof -p 30636 | head -n 200
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF      NODE NAME
perl    30636 root  cwd    DIR  252,0     4096   1441793 /root
perl    30636 root  rtd    DIR  252,0     4096         2 /
perl    30636 root  txt    REG  252,0  1911288   1450581 /usr/bin/perl
perl    30636 root  mem    REG  252,0    89696   2097673 /lib/x86_64-linux-gnu/libgcc_s.so.1
perl    30636 root  mem    REG  252,0  1566440   1441915 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21
(...) # From here is where the 27K files start
perl    30636 root  152u  sock    0,8      0t0  48376482 protocol: TCP
perl    30636 root  153r   CHR    1,9      0t0        10 /dev/urandom
perl    30636 root  154u  sock    0,8      0t0  48376654 protocol: TCP
perl    30636 root  155r   CHR    1,9      0t0        10 /dev/urandom
perl    30636 root  156u  sock    0,8      0t0  48376657 protocol: TCP
perl    30636 root  157r   CHR    1,9      0t0        10 /dev/urandom
perl    30636 root  158u  sock    0,8      0t0  48376667 protocol: TCP
perl    30636 root  159r   CHR    1,9      0t0        10 /dev/urandom
perl    30636 root  160u  sock    0,8      0t0  48377912 protocol: TCP
perl    30636 root  161r   CHR    1,9      0t0        10 /dev/urandom
perl    30636 root  162u  sock    0,8      0t0  48378141 protocol: TCP
perl    30636 root  163r   CHR    1,9      0t0        10 /dev/urandom
perl    30636 root  164u  sock    0,8      0t0  48378145 protocol: TCP
perl    30636 root  165r   CHR    1,9      0t0        10 /dev/urandom
perl    30636 root  166u  sock    0,8      0t0  48378340 protocol: TCP
perl    30636 root  167r   CHR    1,9      0t0        10 /dev/urandom
perl    30636 root  168u  sock    0,8      0t0  48378366 protocol: TCP
root@zaabix:~#

My config is as follows:

# cat /etc/app1.cnf
[server default]
# mysql user and password
user=root
password=6U6hRVrFsnnA5ZgD
ssh_user=root
# working directory on the manager
manager_workdir=/var/log/masterha/app1
# working directory on MySQL servers
remote_workdir=/var/log/masterha/app1

manager_log=/var/log/masterha/app1/replication_check.log

[server1]
hostname=host1
master_binlog_dir=/var/lib/mysql/data

[server2]
hostname=host2
master_binlog_dir=/var/lib/mysql/data

Why do you think the Application would do suck a thing? Regards and thanks Abel