Jenkins build throwing an out of memory error

前端 未结 2 594
既然无缘
既然无缘 2020-12-30 02:57

We have Jenkins running on an ec2 instance. When doing a build, we see the following error:

17:29:39.149 [INFO] [org.gradle.api.Project] OpenJDK 64-Bit Serve         


        
2条回答
  •  梦毁少年i
    2020-12-30 03:49

    I've sold the same problem. (I have ec2, t2.micro, Ubuntu 14, Jenkins, Tomcat, Maven). By default you don't have swap space. To confirm this:

    free -m
    

    Just add some. Try with 1 GB for begin.

    sudo fallocate -l 1G /swapfile
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile
    

    Check again:

    free -m
    

    For more details look here

提交回复
热议问题