{"action":"created","issue":{"url":"https://api.github.com/repos/nats-io/nats-streaming-server/issues/171","repository_url":"https://api.github.com/repos/nats-io/nats-streaming-server","labels_url":"https://api.github.com/repos/nats-io/nats-streaming-server/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/nats-io/nats-streaming-server/issues/171/comments","events_url":"https://api.github.com/repos/nats-io/nats-streaming-server/issues/171/events","html_url":"https://github.com/nats-io/nats-streaming-server/issues/171","id":182272896,"number":171,"title":"Occupies 50% of memory","user":{"login":"zshamrock","id":1122268,"avatar_url":"https://avatars.githubusercontent.com/u/1122268?v=3","gravatar_id":"","url":"https://api.github.com/users/zshamrock","html_url":"https://github.com/zshamrock","followers_url":"https://api.github.com/users/zshamrock/followers","following_url":"https://api.github.com/users/zshamrock/following{/other_user}","gists_url":"https://api.github.com/users/zshamrock/gists{/gist_id}","starred_url":"https://api.github.com/users/zshamrock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zshamrock/subscriptions","organizations_url":"https://api.github.com/users/zshamrock/orgs","repos_url":"https://api.github.com/users/zshamrock/repos","events_url":"https://api.github.com/users/zshamrock/events{/privacy}","received_events_url":"https://api.github.com/users/zshamrock/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-10-11T14:05:01Z","updated_at":"2016-10-14T16:43:44Z","closed_at":"2016-10-14T16:43:44Z","body":"Not sure if it is related to the server or the client library (Java) we use.\r\nBut starting the nats streaming (v0.2.2) the free memory goes from 3.7GB to 167MB immediately.\r\n\r\nChanging the current data dir with lots of files there (121 subjects/channels dirs), to the new data dir, then NATS streaming no longer occupies that much memory, and system continues to have 3.7GB of a free memory.\r\n\r\nIt could be due to:\r\n```\r\n-rw-rw-r-- 1 ubuntu ubuntu 14K Oct 11 13:44 clients.dat\r\n-rw-rw-r-- 1 ubuntu ubuntu 183 Sep  7 19:35 server.dat\r\n```\r\nAs 14K size of the clients.dat looks really suspicious. And this could be the reason why then immediately all the memory was being consumed.\r\n\r\nThe question is then why this file is growing, as there are no active client connections at all to the NATS streaming, and we close the connection on the application shutdown. It also could explain why recently we have to increase `-mc` from 100 to 1000, as we start getting exceptions while connecting to it that maximum number of connections is achieved. Which is again, why?\r\n"},"comment":{"url":"https://api.github.com/repos/nats-io/nats-streaming-server/issues/comments/253855247","html_url":"https://github.com/nats-io/nats-streaming-server/issues/171#issuecomment-253855247","issue_url":"https://api.github.com/repos/nats-io/nats-streaming-server/issues/171","id":253855247,"user":{"login":"kozlovic","id":13736691,"avatar_url":"https://avatars.githubusercontent.com/u/13736691?v=3","gravatar_id":"","url":"https://api.github.com/users/kozlovic","html_url":"https://github.com/kozlovic","followers_url":"https://api.github.com/users/kozlovic/followers","following_url":"https://api.github.com/users/kozlovic/following{/other_user}","gists_url":"https://api.github.com/users/kozlovic/gists{/gist_id}","starred_url":"https://api.github.com/users/kozlovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kozlovic/subscriptions","organizations_url":"https://api.github.com/users/kozlovic/orgs","repos_url":"https://api.github.com/users/kozlovic/repos","events_url":"https://api.github.com/users/kozlovic/events{/privacy}","received_events_url":"https://api.github.com/users/kozlovic/received_events","type":"User","site_admin":false},"created_at":"2016-10-14T16:43:44Z","updated_at":"2016-10-14T16:43:44Z","body":"@zshamrock I am closing this issue now. Will re-open if needed.\r\nThanks!"}}
{"actor":{"display_login":"kozlovic"}}