{"action":"created","issue":{"url":"https://api.github.com/repos/Netflix/spectator/issues/264","labels_url":"https://api.github.com/repos/Netflix/spectator/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/Netflix/spectator/issues/264/comments","events_url":"https://api.github.com/repos/Netflix/spectator/issues/264/events","html_url":"https://github.com/Netflix/spectator/issues/264","id":128501828,"number":264,"title":"ServoRegistry memory leak","user":{"login":"andysworkshop","id":4107468,"avatar_url":"https://avatars.githubusercontent.com/u/4107468?v=3","gravatar_id":"","url":"https://api.github.com/users/andysworkshop","html_url":"https://github.com/andysworkshop","followers_url":"https://api.github.com/users/andysworkshop/followers","following_url":"https://api.github.com/users/andysworkshop/following{/other_user}","gists_url":"https://api.github.com/users/andysworkshop/gists{/gist_id}","starred_url":"https://api.github.com/users/andysworkshop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andysworkshop/subscriptions","organizations_url":"https://api.github.com/users/andysworkshop/orgs","repos_url":"https://api.github.com/users/andysworkshop/repos","events_url":"https://api.github.com/users/andysworkshop/events{/privacy}","received_events_url":"https://api.github.com/users/andysworkshop/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Netflix/spectator/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-01-25T10:06:21Z","updated_at":"2016-01-27T20:30:49Z","closed_at":null,"body":"I was running a small test with 5 instances of a microservice and a python script that periodically hits a REST endpoint on one of them via zuul. That endpoint then uses feign to make calls to the `/info` endpoint on each of the other 4 endpoints. I use the hystrix dashboard to watch aggregated stats collected in turbine as the test runs.  Over time all the microservices and zuul build up heap memory usage and then fail.\r\n\r\nI have heapdumps of the failed services. Eclipse MAT produces the following summary:\r\n\r\n> One instance of \"com.netflix.spectator.servo.ServoRegistry\" loaded by \"org.springframework.boot.loader.LaunchedURLClassLoader @ 0xe4e60d38\" occupies 562,574,240 (92.78%) bytes. The memory is accumulated in one instance of \"java.util.concurrent.ConcurrentHashMap$Node[]\" loaded by \"&lt;system class loader&gt;\".\r\n\r\n![mat-1](https://cloud.githubusercontent.com/assets/4107468/12547850/90026eaa-c34a-11e5-9f2a-2a4136bba565.png)\r\n\r\nI am using spring cloud Brixton M4. I am not running atlas - though I would like to when I figure out how to make the spectator/atlas integration work. I am not doing anything with spectator/servo in code or annotations. My gradle dependencies look like this:\r\n\r\n    dependencies {\r\n      compile 'org.springframework.cloud:spring-cloud-starter-eureka'\r\n      compile 'org.springframework.cloud:spring-cloud-starter-hystrix'\r\n      compile 'org.springframework.cloud:spring-cloud-starter-feign'\r\n      compile 'org.springframework.cloud:spring-cloud-starter-spectator'\r\n    }\r\n\r\nAny ideas why I'm running out of memory and what I can do to fix it?"},"comment":{"url":"https://api.github.com/repos/Netflix/spectator/issues/comments/175840699","html_url":"https://github.com/Netflix/spectator/issues/264#issuecomment-175840699","issue_url":"https://api.github.com/repos/Netflix/spectator/issues/264","id":175840699,"user":{"login":"brharrington","id":1289028,"avatar_url":"https://avatars.githubusercontent.com/u/1289028?v=3","gravatar_id":"","url":"https://api.github.com/users/brharrington","html_url":"https://github.com/brharrington","followers_url":"https://api.github.com/users/brharrington/followers","following_url":"https://api.github.com/users/brharrington/following{/other_user}","gists_url":"https://api.github.com/users/brharrington/gists{/gist_id}","starred_url":"https://api.github.com/users/brharrington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brharrington/subscriptions","organizations_url":"https://api.github.com/users/brharrington/orgs","repos_url":"https://api.github.com/users/brharrington/repos","events_url":"https://api.github.com/users/brharrington/events{/privacy}","received_events_url":"https://api.github.com/users/brharrington/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T20:30:49Z","updated_at":"2016-01-27T20:30:49Z","body":"Re the logging you should be able to override the logging config file used with a system property:\r\n\r\n```\r\n-Dlog4j.configurationFile=log4j.xml\r\n```\r\n\r\nRight now there aren't any sub-properties. The log4j configuration format allows for lookups based on system properties. So we could potentially support a simple set with the default log4j config in the standalone jar to do smaller changes with the default config. If you think it would be helpful, then please file an issue on the atlas project. Also if you have a pointer to a common set that are expected so we can be consistent that would be helpful.\r\n\r\n"}}