change-metrics / monocle

Monocle helps teams and individual to better organize daily duties and to detect anomalies in the way changes are produced and reviewed.
https://changemetrics.io
GNU Affero General Public License v3.0
371 stars 58 forks source link

🚨 docker-compose up fails on macos for exessive memory #695

Open georgettica opened 2 years ago

georgettica commented 2 years ago

that was on the api component

exe:macroscope from monocle-0.1.2.0 and exe:monocle-api from monocle-0.1.2.0).
The build process was killed (i.e. SIGKILL). The typical reason for this is
that there is not enough memory available (e.g. the OS killed a process using
lots of memory).

second run gave

cabal: Failed to build bloodhound-0.17.0.0 (which is required by
exe:macroscope from monocle-0.1.2.0 and exe:monocle-api from monocle-0.1.2.0).
The build process was killed (i.e. SIGKILL). The typical reason for this is
that there is not enough memory available (e.g. the OS killed a process using
lots of memory).

running on macos 16" (non-m1)

georgettica commented 2 years ago

docker vm resources Screen Shot 2021-10-28 at 1 34 17

georgettica commented 2 years ago

related to https://github.com/change-metrics/monocle/pull/696

TristanCacqueray commented 2 years ago

Hey @georgettica , it seems like the memory requirements are missing from the doc, it should indicate that building the image needs more than 2GB of memory.

georgettica commented 2 years ago

4Gi did the trick, but now all of my processes (aside of ES) are crashing

docker-compose ps
          Name                        Command                  State                    Ports
-----------------------------------------------------------------------------------------------------------
monocle_api_1              monocle-api --port 9898          Exit 1
monocle_crawler-legacy_1   monocle --elastic-conn ela ...   Exit 1
monocle_crawler_1          macroscope                       Exit 1
monocle_elastic_1          /tini -- /usr/local/bin/do ...   Up (healthy)   0.0.0.0:9200->9200/tcp, 9300/tcp
monocle_web_1              /bin/sh -c /bin/start.sh         Exit 1
dc-up42 commented 2 years ago

Had this issue while running the tool locally with docker-compose up.

Setting

    mem_limit: 8G
    mem_reservation: 4G

for api and crawler helped. 4G mentioned above was not enough.

georgettica commented 2 years ago

I think also this is not tested on each commit, so we might also need to add automation regarding min mem required