{"action":"created","issue":{"url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/625","repository_url":"https://api.github.com/repos/couchbase/couchbase-lite-net","labels_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/625/labels{/name}","comments_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/625/comments","events_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/625/events","html_url":"https://github.com/couchbase/couchbase-lite-net/issues/625","id":146369422,"number":625,"title":"Xamarin Android crash due to hitting max application memory while syncing large attachments","user":{"login":"Ariemeth","id":541023,"avatar_url":"https://avatars.githubusercontent.com/u/541023?v=3","gravatar_id":"","url":"https://api.github.com/users/Ariemeth","html_url":"https://github.com/Ariemeth","followers_url":"https://api.github.com/users/Ariemeth/followers","following_url":"https://api.github.com/users/Ariemeth/following{/other_user}","gists_url":"https://api.github.com/users/Ariemeth/gists{/gist_id}","starred_url":"https://api.github.com/users/Ariemeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ariemeth/subscriptions","organizations_url":"https://api.github.com/users/Ariemeth/orgs","repos_url":"https://api.github.com/users/Ariemeth/repos","events_url":"https://api.github.com/users/Ariemeth/events{/privacy}","received_events_url":"https://api.github.com/users/Ariemeth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-06T16:41:18Z","updated_at":"2016-04-07T21:33:21Z","closed_at":null,"body":"Created a basic Xamarin Android application and added couchbase lite 1.2 nuget package.  Using the example code from the couchbase website, I created documents and then added 50MB attachments.  After syncing between 3 and 5 of these documents with 50MB attachments the application will be terminated.  Using dumpsys meminfo I can watch the application's memory climb quickly from 60MBs to over 500 at which point Android terminates the application on a Samsung Galaxy Nexus device.\r\nDropping the attachment size down to 19MB will eventually still cause the memory issue, but it can take over 200 attachments.\r\nPreviously to get around this issue we have changed couchbase lite to use only 1 httpclient and not calling dispose on that client until the application is shut down."},"comment":{"url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/comments/207096487","html_url":"https://github.com/couchbase/couchbase-lite-net/issues/625#issuecomment-207096487","issue_url":"https://api.github.com/repos/couchbase/couchbase-lite-net/issues/625","id":207096487,"user":{"login":"borrrden","id":2470288,"avatar_url":"https://avatars.githubusercontent.com/u/2470288?v=3","gravatar_id":"","url":"https://api.github.com/users/borrrden","html_url":"https://github.com/borrrden","followers_url":"https://api.github.com/users/borrrden/followers","following_url":"https://api.github.com/users/borrrden/following{/other_user}","gists_url":"https://api.github.com/users/borrrden/gists{/gist_id}","starred_url":"https://api.github.com/users/borrrden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borrrden/subscriptions","organizations_url":"https://api.github.com/users/borrrden/orgs","repos_url":"https://api.github.com/users/borrrden/repos","events_url":"https://api.github.com/users/borrrden/events{/privacy}","received_events_url":"https://api.github.com/users/borrrden/received_events","type":"User","site_admin":false},"created_at":"2016-04-07T21:33:21Z","updated_at":"2016-04-07T21:33:21Z","body":"I'll definitely be taking a look at this soon.  Thanks for the repro project!!"}}