perfsonar / mesh-config

Centralized configuration framework for measurement points and GUIs
Apache License 2.0
2 stars 0 forks source link

Memory leak in meshconfig-agent #105

Closed arlake228 closed 6 years ago

arlake228 commented 6 years ago

There appears to be a memory leak in the meshconfig-agent. It takes time for it to be really noticeable, but ona few ESnet hosts I have processes using multiple GBs tha have been running for weeks or more, which should never be the case. Restarts bring that back down to 70MB or so (which still seems kinda high). I am able to recreate in a testing environment where I refresh the config every second. Its not immediately obvious the cause, its small enough that the near-term fix may be to add a restart to cron.daily until we replace with psconfig in the next version.

arlake228 commented 6 years ago

Spent time debugging this and narrowed it down to code that is going to be replaced soon that downloads JSON and converts to Config::General. Having trouble beyond though so implemented a daily restart that will be an adequate short-term fix until we replace in 4.1 since the leak is small enough that letting it go for a day should not cause major issues (maybe looking at a 20MB increase in memory usage from start to finish).