{"action":"opened","issue":{"url":"https://api.github.com/repos/Stub-O-Matic/stubo-app/issues/60","labels_url":"https://api.github.com/repos/Stub-O-Matic/stubo-app/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/Stub-O-Matic/stubo-app/issues/60/comments","events_url":"https://api.github.com/repos/Stub-O-Matic/stubo-app/issues/60/events","html_url":"https://github.com/Stub-O-Matic/stubo-app/issues/60","id":92851626,"number":60,"title":"memory overflow with large stubs","user":{"login":"rusenask","id":9080105,"avatar_url":"https://avatars.githubusercontent.com/u/9080105?v=3","gravatar_id":"","url":"https://api.github.com/users/rusenask","html_url":"https://github.com/rusenask","followers_url":"https://api.github.com/users/rusenask/followers","following_url":"https://api.github.com/users/rusenask/following{/other_user}","gists_url":"https://api.github.com/users/rusenask/gists{/gist_id}","starred_url":"https://api.github.com/users/rusenask/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rusenask/subscriptions","organizations_url":"https://api.github.com/users/rusenask/orgs","repos_url":"https://api.github.com/users/rusenask/repos","events_url":"https://api.github.com/users/rusenask/events{/privacy}","received_events_url":"https://api.github.com/users/rusenask/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-03T11:03:22Z","updated_at":"2015-07-03T11:03:22Z","closed_at":null,"body":"Getting error when inserting large stubs into DB or querying scenario stubs:\r\n\"(500, u'OperationFailure: database error: Executor error: Overflow sort stage buffered data usage of 33564302 bytes exceeds internal limit of 33554432 bytes')\"\r\n\r\nThe problem occurs when there are more than 32 MBs of stubs in Scenario. When function \"get_stubs\" is called - pymongo tries to sort them based on priority, loads all of them in memory (cause there are no indexes on stubs) and crashes. \r\nhttp://docs.mongodb.org/manual/reference/limits/#Sorted-Documents\r\n\r\n"}}