1

I am running a CICD pipeline that runs a test script inside a docker container with docker exec and its failing with a return code of 137 every 3rd or 4th time. Here is the code that's running:

docker-compose -p 1234 -f docker-compose.yml exec -T webapp run_tests.sh
STATUS=$?
...
docker-compose -p 1234 -f docker-compose.yml logs --no-color webapp
...
exit $STATUS

Thing is whenever it fails with EXIT CODE 137, container gets killed immediately and there are no logs available for debugging. I think 137 is caused by some external process but I am not able to trace it. Any insights into this will be very helpful.

2 Answers 2

2

Thanks for your question, I experience a related error and it was related to a memory limit, try to increase your swap memory. Here a link with someone with similar problem

Sign up to request clarification or add additional context in comments.

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
1

I experience related error too, in my case i got error when executing docker-compose exec on my Jenkins build. Fixed by add deploy config to docker-compose.yaml to increase memory limit

# docker-compose.yaml
version: '3.8'
services:
  app:
    image: my-app:1.0.0
    build:
      context: .
      dockerfile: ./Dockerfile 
    # ports: 
    # networks: 
    # volumes: 
    # depends_on: 
    deploy:
      resources:
        limits:
          memory: 500M
        reservations:
          memory: 128M

Try changing deploy.resources.limits.memory and deploy.resources.reservations.memory

Ref: https://docs.docker.com/compose/compose-file/deploy/#resources

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.