Reputation: 36
I am currently using RefineryCMS set up on Heroku (free version) integrated with an Amazon S3 account to store and serve the images.
I continue to get an R14 Memory Quota Exceeded in Ruby (MRI). It is only happening on the pages where I have Rails code serving my files (eg. https://scape-cms.herokuapp.com/projects). Other pages where I have images inserted directly therough the Refinery CMS (eg. https://scape-cms.herokuapp.com/contact-page), are fine.
Here are the repeated error logs I get from Heroku:
2016-07-08T15:56:50.216836+00:00 heroku[web.1]: source=web.1 dyno=heroku.52592468.db487335-3609-4b63-b664-46863302a117 sample#load_avg_1m=0.00 sample#load_avg_5m=0.00 sample#load_avg_15m=0.02
2016-07-08T15:56:50.217679+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2016-07-08T15:56:50.216975+00:00 heroku[web.1]: source=web.1 dyno=heroku.52592468.db487335-3609-4b63-b664-46863302a117 sample#memory_total=531.41MB sample#memory_rss=429.12MB sample#memory_cache=0.00MB sample#memory_swap=102.28MB sample#memory_pgpgin=496494pages sample#memory_pgpgout=386638pages sample#memory_quota=512.00MB
2016-07-08T15:56:50.217679+00:00 heroku[web.1]: Process running mem=531M(103.8%)
2016-07-08T15:57:11.876186+00:00 heroku[web.1]: source=web.1 dyno=heroku.52592468.db487335-3609-4b63-b664-46863302a117 sample#load_avg_1m=0.00 sample#load_avg_5m=0.00 sample#load_avg_15m=0.02
2016-07-08T15:57:11.876186+00:00 heroku[web.1]: source=web.1 dyno=heroku.52592468.db487335-3609-4b63-b664-46863302a117 sample#memory_total=531.59MB sample#memory_rss=429.31MB sample#memory_cache=0.00MB sample#memory_swap=102.28MB sample#memory_pgpgin=496542pages sample#memory_pgpgout=386638pages sample#memory_quota=512.00MB
2016-07-08T15:57:11.878013+00:00 heroku[web.1]: Process running mem=531M(103.8%)
2016-07-08T15:57:11.878528+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2016-07-08T15:57:31.826483+00:00 heroku[web.1]: source=web.1 dyno=heroku.52592468.db487335-3609-4b63-b664-46863302a117 sample#load_avg_1m=0.00 sample#load_avg_5m=0.00 sample#load_avg_15m=0.02
2016-07-08T15:57:31.826483+00:00 heroku[web.1]: source=web.1 dyno=heroku.52592468.db487335-3609-4b63-b664-46863302a117 sample#memory_total=531.59MB sample#memory_rss=429.31MB sample#memory_cache=0.00MB sample#memory_swap=102.28MB sample#memory_pgpgin=496952pages sample#memory_pgpgout=387048pages sample#memory_quota=512.00MB
2016-07-08T15:57:31.827268+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2016-07-08T15:57:53.071612+00:00 heroku[web.1]: source=web.1 dyno=heroku.52592468.db487335-3609-4b63-b664-46863302a117 sample#memory_total=531.77MB sample#memory_rss=427.56MB sample#memory_cache=0.00MB sample#memory_swap=104.21MB sample#memory_pgpgin=497018pages sample#memory_pgpgout=387562pages sample#memory_quota=512.00MB
2016-07-08T15:57:53.071535+00:00 heroku[web.1]: source=web.1 dyno=heroku.52592468.db487335-3609-4b63-b664-46863302a117 sample#load_avg_1m=0.00 sample#load_avg_5m=0.00 sample#load_avg_15m=0.02
2016-07-08T15:57:53.072554+00:00 heroku[web.1]: Process running mem=531M(103.9%)
2016-07-08T15:57:53.072554+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
My source code can be found here: github.com/lltheis/scape-cms.
I'm at a loss on where to go from here - in concept it seems that I should be able to serve images stored on my S3, as they are 164KB to 500KB - so they should be under the limit. But somewhere my processes are hitting that 512MB limit.
Thanks!
Upvotes: 0
Views: 116
Reputation: 91
The problem could be multiple:
It could be resolved by adding this:
# config/initializers/dragonfly.rb
Dragonfly.app.configure do
plugin :imagemagick, identify_command: "identify -limit memory 0 -limit map 0"
end
I hope this could help, it's hard to find the problem on R14 errors.
Upvotes: 2