1
votes
2016-12-01T14:26:14.421530+00:00 heroku[run.6714]: Error R14 (Memory quota exceeded)
2016-12-01T14:25:51+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.07 sample#load-avg-5m=0.09 sample#load-avg-15m=0.075 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15664468.0kB sample#memory-free=11956144.0kB sample#memory-cached=2248760.0kB sample#memory-redis=1421856bytes sample#hit-rate=1 sample#evicted-keys=0
2016-12-01T14:26:35.660410+00:00 heroku[run.6714]: Process running mem=780M(152.4%)
2016-12-01T14:26:35.660501+00:00 heroku[run.6714]: Error R14 (Memory quota exceeded)

I'm getting above error on heroku logs. I don't understand the solution and why this error occur.

My server confirmation is high -

  1. Professional Dynos
  2. 2X Worker
  3. Premium Redis Plan - ($15)
  4. Database is - Standard 4 Plan

But still getting this error

1

1 Answers

2
votes

I suggest you to see the code with Name.all.each do |block| and change it to Name.find_each do |block|. This way you can save memory by not loading entire model all at once.

Also try running some benchmark tests so that you can find memory leaks that are causing R14 errors.

This link gives you more information https://devcenter.heroku.com/articles/ruby-memory-use#memory-leaks