Closed tvdstorm closed 4 years ago
Error 137 in Docker denotes that the container was ‘KILL’ed by ‘oom-killer’ (Out of Memory). This happens when there isn’t enough memory in the container for running the process. Cassandra is using (resp. reserving) a lot of resources. I did `docker ps -q | xargs docker stats --no-stream` and it reserves more than 4GiB of memory | CONTAINER ID | NAME | CPU % | MEM USAGE / LIMIT | MEM % | NET I/O | BLOCK I/O | PIDS |
---|---|---|---|---|---|---|---|---|---|
9d6582c91414 | test_Stuff_1 | 0.78% | 4.127GiB / 15.55GiB | 26.54% | 3.94kB / 1.78kB | 25.3MB / 2.56MB | 50 |
To change this add the following environment to your cassandra container:
environment:
MAX_HEAP_SIZE: 2G
HEAP_NEWSIZE: 400M
This will reduce the amount of memory reserved, of course you can change the values but I don't know what the minimum values are for Cassandra to still work properly.
The environment will be included in the next version, for now please just add it to your Cassandra container in databases.yaml
Thanks, I'll try it out.
Ok, no observable change. Doing your command above gives me this:
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
380376edd748 user-review-product_polystore-ui_1 0.00% 328.3MiB / 1.943GiB 16.50% 1.02kB / 0B 0B / 0B 18
816c8e420dbb user-review-product_typhon-polystore-service_1 0.44% 212.2MiB / 1.943GiB 10.66% 77.5kB / 16.8kB 0B / 0B 39
3faed7fce5f3 user-review-product_Inventory_1 0.15% 11.65MiB / 1.943GiB 0.59% 1.11kB / 0B 0B / 0B 30
72b642b89915 user-review-product_Reviews_1 0.60% 10.21MiB / 1.943GiB 0.51% 5.98kB / 3.76kB 0B / 0B 34
70f7d5a0c92d user-review-product_polystore-mongo_1 0.58% 12MiB / 1.943GiB 0.60% 18kB / 76.5kB 0B / 0B 34
335a632c0612 user-review-product_MoreStuff_1 1.79% 159.5MiB / 1.943GiB 8.02% 1.29kB / 0B 0B / 0B 47
eef23746ba39 user-review-product_typhonql-server_1 0.22% 55.57MiB / 1.943GiB 2.79% 1.11kB / 0B 0B / 0B 25
Note the limits around 2Gb, could that be the problem?
It looks like you only have 1.9GiB of memory available, so setting Cassandra to use 2GiB will still produce the out-of-memory exception. Try setting it to 800M or something like that.
To assign more memory to your docker VM see here
This did the trick. Thanks.
After a while after startup Cassandra crashes with exit code 137
See title.
Docker Compose / Kubernetes
If the bug happens when deploying the Polystore:
Model
Inventory.tdl:
Reviews.tdl
Stuff.tdl:
dbTypes.tdl:
Expected behavior
Not crashing.
Screen shot
Additional context
I've updated TyphonDL today to the latest version. Then generated the DL stuff from our TyphonML model (https://github.com/typhon-project/typhonql/blob/dev/typhonql/src/lang/typhonql/test/resources/user-review-product/user-review-product.xmi). And used the deploy.sh script to start.