9 months ago
Hi, what could explain a crazy memory leak and therefore monthly invoice on a ruby on rails delayed job server?
It's consuming about a 1TB of memory every month and our app has very few members.
I'm a beginner but the only one left in the team... This is what I see in the log:
All day long.
Can simple warning like that create memory leaks?
Thanks
Opening connection...
/usr/local/rvm/gems/2.7.8/gems/socket.io-client-simple-1.2.1/lib/socket.io-client-simple/client.rb:50: warning: URI.escape is obsolete
Connection error
#<SocketError: getaddrinfo: Name or service not known>
"https://socket.hockeycommunity.com:8443";
I, [2024-09-25T00:09:05.684049 #30360] INFO -- : [ActiveJob] [Notify::CreateNotificationJob] [8b1cce79-9c80-4e08-8b64-7aa4b2d004ed] Performed Notify::CreateNotificationJob (Job ID: 8b1cce79-9c80-4e08-8b64-7aa4b2d004ed) from Resque(default) in 1322.44ms
I, [2024-09-25T00:09:05.685421 #30360] INFO -- : done: (Job{default} | ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper | [{"job_class"=>"Notify::CreateNotificationJob", "job_id"=>"8b1cce79-9c80-4e08-8b64-7aa4b2d004ed", "provider_job_id"=>nil, "queue_name"=>"default", "priority"=>nil, "arguments"=>[{"source"=>{"_aj_globalid"=>"gid://hockeycommunity/User/71880"}, "target"=>{"_aj_globalid"=>"gid://hockeycommunity/Games::Event/49006"}, "title"=>"Mitchell Frank has requested a goalie for their event on Sep 24 at 10:15 PM", "text"=>"Mitchell Frank has requested a goalie for their event on Sep 24 at 10:15 PM", "email_params"=>{"event"=>{"_aj_globalid"=>"gid://hockeycommunity/Games::Event/49006"}, "text"=>"Mitchell Frank has requested a goalie for their event on Sep 24 at 10:15 PM", "_aj_symbol_keys"=>["event", "text"]}, "email_template"=>"event_mailer#multifunction", "deduplication_key"=>"mitchellfrank_goalie_request_49006", "user_id"=>98856, "notification_type"=>{"_aj_globalid"=>"gid://hockeycommunity/Notify::NotificationType/12"}, "method"=>"web", "_aj_symbol_keys"=>["source", "target", "title", "text", "email_params", "email_template", "deduplication_key", "user_id", "notification_type", "method"]}], "executions"=>0, "exception_executions"=>{}, "locale"=>"en-CA", "timezone"=>"UTC", "enqueued_at"=>"2024-09-24T22:08:28Z"}])
3 Replies
9 months ago
After a cursory look at your memory usage, I don't think your memory usage is above board considering your cron service is using 12 GB's. I can't speak to Ruby but maybe you can attempt to profile your app and it's allocations to see if you have any expensive methods?
Status changed to Awaiting User Response railway[bot] • 9 months ago
8 months ago
Fixed after days of research. It was an issue with the resque-scheduler cron feature creating infinite jobs https://github.com/resque/resque-scheduler
Status changed to Awaiting Railway Response railway[bot] • 9 months ago
Status changed to Awaiting User Response railway[bot] • 9 months ago
Status changed to Solved christian • 9 months ago