{"action":"created","issue":{"url":"https://api.github.com/repos/cantino/huginn/issues/978","labels_url":"https://api.github.com/repos/cantino/huginn/issues/978/labels{/name}","comments_url":"https://api.github.com/repos/cantino/huginn/issues/978/comments","events_url":"https://api.github.com/repos/cantino/huginn/issues/978/events","html_url":"https://github.com/cantino/huginn/issues/978","id":102113947,"number":978,"title":"dj: memory leak","user":{"login":"K1773R","id":913817,"avatar_url":"https://avatars.githubusercontent.com/u/913817?v=3","gravatar_id":"","url":"https://api.github.com/users/K1773R","html_url":"https://github.com/K1773R","followers_url":"https://api.github.com/users/K1773R/followers","following_url":"https://api.github.com/users/K1773R/following{/other_user}","gists_url":"https://api.github.com/users/K1773R/gists{/gist_id}","starred_url":"https://api.github.com/users/K1773R/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/K1773R/subscriptions","organizations_url":"https://api.github.com/users/K1773R/orgs","repos_url":"https://api.github.com/users/K1773R/repos","events_url":"https://api.github.com/users/K1773R/events{/privacy}","received_events_url":"https://api.github.com/users/K1773R/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-08-20T10:55:16Z","updated_at":"2015-08-25T15:50:14Z","closed_at":null,"body":"delay_job is using more and more memory over time. it starts at ~150M and rises forever, slowly tough. As i have 16 workers, im affected much faster.\r\nAny way to debug this? Im currently just restarting the workers every X hours.\r\nIm using Web,Mail,MailDigest,XMPP,Trigger-Agents. With Web+Trigger being the most used.\r\n\r\nCan foreman handle memory usage of dj? ie, restart a dj if mem is higher than X and no jobs currently running? restarting a worker after X jobs might also be an option.\r\n"},"comment":{"url":"https://api.github.com/repos/cantino/huginn/issues/comments/134640551","html_url":"https://github.com/cantino/huginn/issues/978#issuecomment-134640551","issue_url":"https://api.github.com/repos/cantino/huginn/issues/978","id":134640551,"user":{"login":"virtadpt","id":639730,"avatar_url":"https://avatars.githubusercontent.com/u/639730?v=3","gravatar_id":"","url":"https://api.github.com/users/virtadpt","html_url":"https://github.com/virtadpt","followers_url":"https://api.github.com/users/virtadpt/followers","following_url":"https://api.github.com/users/virtadpt/following{/other_user}","gists_url":"https://api.github.com/users/virtadpt/gists{/gist_id}","starred_url":"https://api.github.com/users/virtadpt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtadpt/subscriptions","organizations_url":"https://api.github.com/users/virtadpt/orgs","repos_url":"https://api.github.com/users/virtadpt/repos","events_url":"https://api.github.com/users/virtadpt/events{/privacy}","received_events_url":"https://api.github.com/users/virtadpt/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T15:50:14Z","updated_at":"2015-08-25T15:50:14Z","body":"Data!\r\n```\r\n06:28:11 dj1.1      | script/delayed_job:5:in `<main>'\r\n06:28:52 schedule.1 | Queuing event propagation\r\n06:28:52 schedule.1 | Queuing schedule for every_1m\r\n06:29:51 schedule.1 | Queuing schedule for every_2m\r\n06:29:54 schedule.1 | Queuing event propagation\r\n06:29:54 schedule.1 | Queuing schedule for every_1m\r\n06:31:17 schedule.1 | Queuing event propagation\r\n06:31:44 twitter.1  | Man in stable condition after East Oakland shooting http://t.co/owRD0aeFBa\r\n06:31:49 twitter.1  |  -> Lifeline: Monitor Twitter for keywords\r\n06:34:13 dj1.1      | exited with code 137\r\n06:34:13 dj1.1      | Killed\r\n06:34:13 system     | sending SIGTERM to all processes\r\n06:34:13 web.1      | terminated by SIGTERM\r\n06:34:13 schedule.1 | terminated by SIGTERM\r\n06:34:13 twitter.1  | terminated by SIGTERM\r\n06:34:13 dj0.1      | terminated by SIGTERM\r\n06:34:13 dj2.1      | terminated by SIGTERM\r\n```\r\ndj.1 was killed with a signal 137 (out of memory).  The 'system` process detected this and sent SIGTERMs to the web server, scheduler, Twitter subsystem, and dj0.1 and dj2.1.  However, not everything is responding to SIGTERM correctly.  From my currently running process list:\r\n```\r\n14106 pts/5    Sl    13:20 /home/drwho/.rvm/rubies/ruby-2.1.5/bin/ruby bin/rails server -b127.0.0.1\r\n14114 pts/5    Sl   132:16 ruby script/delayed_job -i 0 run\r\n14120 pts/5    Rl   136:16 ruby script/delayed_job -i 2 run\r\n```"}}