# Builds have started failing - 137 error

**URL:** <https://discuss.circleci.com/t/builds-have-started-failing-137-error/20207>\
**Category:** Build Environment\
**Created:** [February 21, 2018, 12:42pm UTC](https://discuss.circleci.com/t/builds-have-started-failing-137-error/20207 "2018-02-21T12:42:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisleversuch](https://avatars.discourse-cdn.com/v4/letter/c/2bfe46/32.png) [@chrisleversuch](https://discuss.circleci.com/u/chrisleversuch)\
**Post date:** [February 21, 2018, 12:42pm UTC](https://discuss.circleci.com/t/builds-have-started-failing-137-error/20207/1 "2018-02-21T12:42:18Z")

</div>

The builds on one of my projects have started failing with 137 errors and I can’t work out why. Everything was working fine a couple of weeks ago. I’ve tried rebuilding the last successful build and that now fails.

Based on what I’ve read on other posts I’ve tried adjusting the -Xmx value in MAVEN\_OPTS and also added -XX:MaxPermSize (although the build log says it’s ignoring this option as it’s been removed). I’ve also added -Xmx2048m to my pom as I read that MAVEN\_OPTS isn’t always enough. I’m not on a paid plan yet so can’t adjust resource\_class.

If I SSH into the CircleCI build and run ‘mvn test’ that succeeds - does this not have the same memory limits?

Is there anything else I can try?

EDIT - Forgot to add, the build worked once while I was experimenting. In the Spin Up Environment step it said “image cache not found on this host, downloading circleci/openjdk:8-jdk”. In all the failures, it said “using image circleci/openjdk@sha256:043e50a83986b9413ab1ee6a14382f843cc007ba52c0335e9269eb51286b6ac1”

My config is below.

Thanks.

```
version: 2

jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/openjdk:8-jdk

      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/postgres:9.4

    working_directory: ~/repo

    environment:
      # Customize the JVM maximum heap limit
      MAVEN_OPTS: -Xmx512m -XX:MaxPermSize=512m

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "pom.xml" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-

      - run: mvn dependency:go-offline

      - save_cache:
          paths:
            - ~/.m2
          key: v1-dependencies-{{ checksum "pom.xml" }}

      # run tests!
      - run: mvn -e test

      - store_test_results:
          path: target/surefire-reports

      - run: mvn surefire-report:report

      - store_artifacts:
          path: target/site
          destination: test-reports
```

---

<div class="post-metadata">

**Author:** ![softwaredoug](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/softwaredoug/32/18023_2.png) [@softwaredoug](https://discuss.circleci.com/u/softwaredoug)\
**Post date:** [March 20, 2018, 2:35pm UTC](https://discuss.circleci.com/t/builds-have-started-failing-137-error/20207/2 "2018-03-20T14:35:38Z")

</div>

I have gotten similar errors on my Java+gradle builds and have yet to find a way to resolve it.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 2:35pm UTC](https://discuss.circleci.com/t/builds-have-started-failing-137-error/20207/3 "2018-06-18T14:35:39Z")

</div>

Closed on June 18, 2018, 2:35pm UTC

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