Builds have started failing - 137 error


#1

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

#2

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


#3

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