anshul410
anshul410

Reputation: 884

Ruby production server memory leak

I have a production rails application server, the memory usage of rails worker process of which increases from ~300 MB to ~1.2GB in 3-4 days.

How can I debug this memory leak. I am using rvm 2.2.2 and my application server is deployed in AWS:ElasticBeanstalk . I am using puma web server.

Please provide detailed answer.

Upvotes: 3

Views: 1161

Answers (1)

haradwaith
haradwaith

Reputation: 2731

I've faced a similar problem recently with ruby 2.2.2. I was writing to AWS S3 with the aws-sdk gem. I found the solution on this issue on aws-sdk GitHub.

There is a memory leak in the StringIO class shipped with ruby 2.2.0 to 2.2.2. This class is used by aws-sdk when sending files to S3. This bug was reported and fixed on 2.2.3.

Hopefully, upgrading to ruby 2.2.3 will fix your problem.

Upvotes: 3

Related Questions