Fix deploying to Heroku OOM issues [ci skip] #6480
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After fixing the metabase-deploy repo I thought I'd give the "Deploy to Heroku" button a test to make sure things were working correctly. To my horror, they were not; the application was constantly running out of memory when Liquibase attempted to parse our "huge" migrations file. It seems like this is not a new issue: #3360, but it has certainly gotten worse over time as the migrations file has grown.
I tried every trick in the book to get things to work correctly without having to change anything in Metabase itself. After a few hours of experimenting I have found a set of JVM options that seems to resolve the issue.
Corresponding PR for deploy repo: metabase/metabase-deploy#18
It seems like sooner or later we'll have to split our migrations file into two or more files to resolve these memory issues, but this seems to be a short-term fix that works as we'd expect