{"action":"created","issue":{"url":"https://api.github.com/repos/hazelcast/hazelcast/issues/9799","repository_url":"https://api.github.com/repos/hazelcast/hazelcast","labels_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/9799/labels{/name}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/9799/comments","events_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/9799/events","html_url":"https://github.com/hazelcast/hazelcast/issues/9799","id":205346471,"number":9799,"title":"Hazelcast ScheduledExecutorService OOME","user":{"login":"jevel0per","id":24524367,"avatar_url":"https://avatars2.githubusercontent.com/u/24524367?v=3","gravatar_id":"","url":"https://api.github.com/users/jevel0per","html_url":"https://github.com/jevel0per","followers_url":"https://api.github.com/users/jevel0per/followers","following_url":"https://api.github.com/users/jevel0per/following{/other_user}","gists_url":"https://api.github.com/users/jevel0per/gists{/gist_id}","starred_url":"https://api.github.com/users/jevel0per/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jevel0per/subscriptions","organizations_url":"https://api.github.com/users/jevel0per/orgs","repos_url":"https://api.github.com/users/jevel0per/repos","events_url":"https://api.github.com/users/jevel0per/events{/privacy}","received_events_url":"https://api.github.com/users/jevel0per/received_events","type":"User","site_admin":false},"labels":[{"id":137752575,"url":"https://api.github.com/repos/hazelcast/hazelcast/labels/Team:%20Core","name":"Team: Core","color":"109def","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-02-04T12:58:05Z","updated_at":"2017-05-17T16:07:30Z","closed_at":"2017-04-10T10:55:41Z","body":"Using ScheduledExecutorService from hazelcast 3.8 i've got an out of memory exception. The thing is i'm making a service which should remind to user about some event during a day. Execution of tasks should be fault-tolerant. A user sets new reminder which is a task for ScheduledExecutorService, thus amount of tasks can be several thousands per day. Each task adds to scheduler as one-shot action using schedule(Runnable command, long delay, TimeUnit unit). A delay can't be longer then 24 hours. When i've started to make tests and add tasks in loop, i've got an oom exception. I thought a task after execution will be removed from memory, but probably i was wrong.\r\n\r\nCan you answer for several question:\r\n1. Should a task be removed from memory after execution?\r\n2. Is there any setting to do that?\r\n3. Can i use ScheduledExecutorService for a lot of one-shot action tasks?\r\n"},"comment":{"url":"https://api.github.com/repos/hazelcast/hazelcast/issues/comments/302139271","html_url":"https://github.com/hazelcast/hazelcast/issues/9799#issuecomment-302139271","issue_url":"https://api.github.com/repos/hazelcast/hazelcast/issues/9799","id":302139271,"user":{"login":"hitendrapratap","id":400545,"avatar_url":"https://avatars3.githubusercontent.com/u/400545?v=3","gravatar_id":"","url":"https://api.github.com/users/hitendrapratap","html_url":"https://github.com/hitendrapratap","followers_url":"https://api.github.com/users/hitendrapratap/followers","following_url":"https://api.github.com/users/hitendrapratap/following{/other_user}","gists_url":"https://api.github.com/users/hitendrapratap/gists{/gist_id}","starred_url":"https://api.github.com/users/hitendrapratap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hitendrapratap/subscriptions","organizations_url":"https://api.github.com/users/hitendrapratap/orgs","repos_url":"https://api.github.com/users/hitendrapratap/repos","events_url":"https://api.github.com/users/hitendrapratap/events{/privacy}","received_events_url":"https://api.github.com/users/hitendrapratap/received_events","type":"User","site_admin":false},"created_at":"2017-05-17T16:07:30Z","updated_at":"2017-05-17T16:07:30Z","body":"Why we have to keep tasks after its being executed? "}}
{"actor":{"display_login":"hitendrapratap"}}