{"action":"opened","issue":{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1519","repository_url":"https://api.github.com/repos/mitmproxy/mitmproxy","labels_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1519/labels{/name}","comments_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1519/comments","events_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1519/events","html_url":"https://github.com/mitmproxy/mitmproxy/issues/1519","id":174508725,"number":1519,"title":"Excessive memory usage over time (possible memory leak/cache issue?)","user":{"login":"Schamper","id":1254028,"avatar_url":"https://avatars.githubusercontent.com/u/1254028?v=3","gravatar_id":"","url":"https://api.github.com/users/Schamper","html_url":"https://github.com/Schamper","followers_url":"https://api.github.com/users/Schamper/followers","following_url":"https://api.github.com/users/Schamper/following{/other_user}","gists_url":"https://api.github.com/users/Schamper/gists{/gist_id}","starred_url":"https://api.github.com/users/Schamper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Schamper/subscriptions","organizations_url":"https://api.github.com/users/Schamper/orgs","repos_url":"https://api.github.com/users/Schamper/repos","events_url":"https://api.github.com/users/Schamper/events{/privacy}","received_events_url":"https://api.github.com/users/Schamper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-01T12:19:21Z","updated_at":"2016-09-01T12:19:21Z","closed_at":null,"body":"##### Steps to reproduce the problem:\r\n\r\n1. Start mitmdump/own proxy similar to [this example](https://github.com/mitmproxy/mitmproxy/blob/master/examples/flowbasic). Note that in the \"own proxy\" the flow was also deleted, similar to mitmdump.\r\n2. Start browsing (a lot).\r\n3. Observe memory usage growing steadily with each request, reaching multiple GBs within a couple minutes, never coming back down.\r\n\r\n##### What is the expected behavior?\r\n\r\nMemory usage should ideally stay relatively the same over time.\r\n\r\n##### What went wrong?\r\n\r\nMemory is being held hostage somewhere.\r\n\r\n##### Any other comments? What have you tried so far?\r\n\r\nI'm also using a modified version of the `har_dump` script, but it doesn't matter if I have it enabled or disabled, suggesting the issue is somewhere in mitmproxy.\r\n\r\nTried inspecting heap memory using `guppy`, but I've never really used it so I didn't get very far with it. Printing the summary using guppy/other similar memory inspection libraries show that an insanely high number of `dict` and `str` objects are kept in memory, which seem to never stop growing. \r\n\r\nI've tried digging into the source of mitmproxy but I'm not too familiar with it so I'm not able to pinpoint where the issue might be. \r\n\r\n---\r\n\r\nMitmproxy Version: master (0.18)\r\nOperating System: Ubuntu 16.04\r\n"}}
{"actor":{"display_login":"Schamper"}}