-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak in ZeroMQPubServerChannel #40507
Comments
More info: Might be related to #30411 |
Can you provide me with the minion and master configurations so that I can attempt to replicate this? Thanks, |
master config:
minion config:
haproxy.cfg:
|
I'm sure the memory leak is related to the fact that we have an haproxy in the middle. |
We are aware of a leak in the master publisher. This was the original issue for this. #31454 It sounds like @DmitryKuzmenko is still investigating the issue. Thanks, |
@gtmanfred @DmitryKuzmenko the 'strange' behavior that we see between the ha-proxy and salt master is that once in few sec, there is SYN (from ha-proxy towards the salt-master) -> SYN/ACK (salt-master towards ha-proxy) -> RST (ha-proxy -> salt master). Thoughts? |
What's first I'd try to do here is to write a simple 0MQ pub-sub test and try it via ha-proxy. |
@DmitryKuzmenko another suggestion I have is to write a simple python code that causes syn/syn-ack/rst in a loop the salt-master (may be with Scapy?) |
It seems that the: |
managed to significantly reduce the leak by adding this configuration to the haproxy default conf: The leak still exist. |
@DmitryKuzmenko any news? Thanks |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
@rom-stratoscale sorry I've missed your comment here. Currently I have no time to work on this issue but want to confirm have you tried last Salt releases? Is the issue still to be there? |
Thank you for updating this issue. It is no longer marked as stale. |
@DmitryKuzmenko ... might be similar issues here. Complete out of the box install from official salt repos, stock configuration with only , only 2 minions connected. After several days of idle running (no actual usage of either salt master or salt minions) the memory usage grows to 5GB and keeps growing. Unfortunately I cycled the master but in the next few days I'll try to determine where it's leaking. Versions report
|
@goodwillcoding thank you for report. Please keep me notified. |
@DmitryKuzmenko ... another week same problem. nothing changes. B. At this point we are considering installing a cron task that restarts the service just to avoid this, which is frankly an insane solution. I also commented here #50313 ... maybe the same issue. @DmitryKuzmenko can you please advise if this is even being looked at cause it's not going to be possible to even use salt if this continues, it would completely unusable as all the memory is consumed. |
We're also having this issue on:
It sure does look a lot like zeromq/libzmq#954 and zeromq/libzmq#1565 when I looked at memory usage in |
@simmel can you please provide a detailed description of your scenario? |
We have a hardware loadbalancer for fronting our salt master zmq port. This hw lb can't easily be modified to do protocol specific checks, in this case "talk salt mq" or connect to zmq. So it just does a very simple TCP connect and then closes the connection. So to reproduce it I just did, I can't confirm it because I'm not at work: while true; do
nc -z localhost 4505;
done and then watch the memory with Note that this might only be triggered on an idle master which supports the "memory reclaimed on real connections" theory. |
@simmel thank you for details. I'll check it and share my results. |
@nir-stratoscale @simmel are you seeing this on a supported version of Salt >v3000.9? |
@sagetherage I can confirm that it was solved when we upgraded to 3002.2 as you can see in this graph = ) |
@simmel that is great to hear! |
Description of Issue/Question
I have a salt master connected to 50 minions, and I see a slow memory leak in the ZeroMQPubServerChannel
it started with 40Mb, the memory usage keeps going up about 40MB per hour.
I'm also having minions disconnection issue but not sure its related.
Setup
(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)
The minions are connecting to the master behind an haproxy.
Steps to Reproduce Issue
(Include debug logs if possible and relevant.)
Versions Report
(Provided by running
salt --versions-report
. Please also mention any differences in master/minion versions.)Master:
salt --versions-report
Salt Version:
Salt: 2016.11.1
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.6.0
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 1.0.6
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: 1.2.5
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.5 (default, Nov 6 2016, 00:28:07)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: centos 7.2.1511 Core
machine: x86_64
release: 3.10.0-327.10.1.el7.strato0004.46fa8ebfb529.x86_64
system: Linux
version: CentOS Linux 7.2.1511 Core
Minions:
salt --versions-report
Salt Version:
Salt: 2016.11.1
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
Python: 2.7.12 (default, Sep 29 2016, 13:30:34)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 14.7.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.4.2
ZMQ: 4.1.4
System Versions:
dist: fedora 24 Twenty Four
machine: x86_64
release: 4.5.5-300.fc24.x86_64
system: Linux
version: Fedora 24 Twenty Four
The text was updated successfully, but these errors were encountered: