Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku memory quota exceeded with simple Grails app

Tags:

heroku

grails

I am trying to deploy very simple Grails 2.3.7 application (several REST controllers and Spring Security REST) on Heroku and constantly getting

Error R14 on Heroku (Memory Quota Exceeded)
Process running mem=906M(177.1%)

My BuildConfig.groovy contains:

grails.project.fork = [
    test: false,
    run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
    war: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
    console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256]
]

Why does Grails consume so much memory and how can i tune my BuildConfig.groovy to fit into 512mb Heroku limitation?

UPD May be the issue is in my travis.yml file? It looks like this:

language: groovy
jdk:
- oraclejdk7
before_script:
- chmod +x grailsw
script: ./grailsw clean
  && ./grailsw refresh-dependencies
  && ./grailsw test-app
before_deploy:
- chmod +x grailsw
deploy:
  provider: heroku
  app: igetit
  on: develop
like image 248
turboDi Avatar asked Oct 31 '22 20:10

turboDi


1 Answers

My comment as an answer:

If you use grails war, then these memory settings are not used. They are only used for forked execution, for example when running test-app or run-war. Your memory settings are probably controlled by your JAVA_OPTS. I'm not familiar with Heroku, but you could take a look here:

Heroku JVM tuning

like image 170
Erik Pragt Avatar answered Nov 15 '22 09:11

Erik Pragt