-
Notifications
You must be signed in to change notification settings - Fork 380
Foundation is giving OOM errors with 120 routes, 45 tables and around 250 I18N messagesΒ #1651
Copy link
Copy link
Closed
Description
Hey folks, more than an issue I would like to receive some help (if possible) because I have the following project overview:
- Around 250 I18N messages
- 120 routes
- 45 tables ~ persist models
With this set-up and by using Circle CI, the build is giving OOM errors when building with stack build at it hangs at Foundation.hs as you can see below:
[312 of 445] Compiling Foundation ( src/Foundation.hs, .stack-work/dist/x86_64-linux/Cabal-2.4.0.1/build/Foundation.o )
-- While building package cerebro-0.0.0 using:
/root/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.3 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.4.0.1 build lib:cerebro exe:cerebro exe:rank exe:read-translation-csv exe:seed exe:sync-p2s exe:write-translations --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
Process exited with code: ExitFailure (-9) (THIS MAY INDICATE OUT OF MEMORY)As you can see, we know have 445 modules and I have done the following attempts to fix this issue:
- I have splitted the big "Model" containing all the tables to smaller files, each one with its table. At the moment,
Model.hslooks like this:
module Model
( module Model.Table1
, module Model.Table2
) where
import Model.Table1
import Model.Table2- I have removed almost 300 no longer necessary I18N translations (since I checked the following issue)
- I have done the following workaround for forms with more than 10 fields
Some extra information:
- The current LTS in the CI is 13.11 ~ GHC 8.6.3
- The docker image used to build in the CI is fpco/stack-build:lts-13.11
- On my local machine, the outcome from the command
/usr/bin/time -f "mem=%K RSS=%M elapsed=%E cpu.sys=%S .user=%U" stack buildis:
mem=0 RSS=4402548 elapsed=6:54.16 cpu.sys=12.01 .user=401.93I almost have run out of ideas π, maybe any of you folks would have another idea in order to make it build on Circle CI? Thanks for your help and excuse me if this is kind of weird, English is not my main language π
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels