Docker Exited with code 137

docker
circle.yml

#1

I’m using - image: peopleperhour/dynamodb for a docker image in my config file.

In CircleCI it’s outputting the following.

Initializing DynamoDB Local with the following configuration:
Port:	8000
InMemory:	false
DbPath:	/var/dynamodb_local
SharedDb:	false
shouldDelayTransientStatuses:	false
CorsParams:	*


Exited with code 137

The first tests pass fine and Exited with code 137 doesn’t happen until later on. But once that error happens all the tests start failing.

I saw this link and changed my code to the following with no luck.

  - image: peopleperhour/dynamodb
    environment:
        MAX_HEAP_SIZE: 2048m
        HEAP_NEWSIZE: 512m

Any ideas on how to fix this?


#2

I’d try further reducing the memory restrictions and maybe allocate more RAM to the container.


#3

I’m still pretty new to CircleCI. Mind providing example code of how to achieve this?


#4

You should modify the env vars, like MAX_HEAP_SIZE, to use less memory.

And you’ll need to be whitelisted to acquire additional resources for your containers. You can reach out to cs@circleci.com for that


#5

Ok so what should I reduce it to? That code I only added due to that link I found on this forum? So I thought added it would help.


#6

You have 4GB of RAM in a container by default. You’re allocating 2GB to the max heap size. The value required will vary between apps, but reducing that number is a good start.


#7

I just tried both 1024 and 512, both didn’t work at all. Could this maybe be a problem with my CircleCI plan? I currently only have the most basic macOS plan and no Linux upgrades (this is running on Linux). Super confusing why this is happening.


#8

Maybe running it locally will help you debug why it’s failing:

https://circleci.com/docs/2.0/local-jobs/

You can also install DynamoDB directly into your base container instead of using a separate image.


#9

Any guide on how to install directly into the base container?


#10

http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html


#11

Ok just tried to do that. Now the database is failing after like 2 minutes or so and it says Received 'killed' signalReceived 'killed' signal.


#12

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.