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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With