On Thu, Aug 17, 2017 at 11:11 AM, Thorvald Hallvardsson <
[email protected]> wrote:

> Hi,
>
> I'm trying to run simple pipeline integrated with Jenkins running on
> OpenShift.
>
> It was running fine before then I deleted the entire project and generally
> was trying to reproduce all the steps but beforehand I built blueocean now
> I just want standard openshift template... the problem is... I create a
> jenkins project, I assign 8GB of memory to jenkins, I run x86_64 version it
> starts up fine but as soon as I execute the pipeline it drops:
>
> WARNING: Unexpected exception in CPS VM thread: CpsFlowExecution[Owner[
> myjenkins-nodejs-pipeline-master/1:myjenkins-nodejs-pipeline-master #1]]
> java.lang.OutOfMemoryError: Metaspace
>

Metaspace is harcoded to 100m unless you override the GC args:
https://github.com/openshift/jenkins/blob/master/2/contrib/s2i/run#L124-L127

if you want a different value, override JAVA_GC_OPTS



>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
>         at jenkins.util.AntClassLoader.defineClassFromData(
> AntClassLoader.java:1140)
>         at hudson.ClassicPluginStrategy$AntClassLoader2.
> defineClassFromData(ClassicPluginStrategy.java:884)
>         at jenkins.util.AntClassLoader.getClassFromStream(
> AntClassLoader.java:1311)
>         at jenkins.util.AntClassLoader.findClassInComponents(
> AntClassLoader.java:1364)
>         at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1327)
>         at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1080)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>         at org.jenkinsci.plugins.workflow.cps.CpsThread.<init>(
> CpsThread.java:115)
>         at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.
> addThread(CpsThreadGroup.java:177)
>         at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$
> 1.run(CpsFlowExecution.java:495)
>         at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.run(
> CpsVmExecutorService.java:35)
>         at java.util.concurrent.Executors$RunnableAdapter.
> call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at hudson.remoting.SingleLaneExecutorService$1.
> run(SingleLaneExecutorService.java:112)
>         at jenkins.util.ContextResettingExecutorService$1.run(
> ContextResettingExecutorService.java:28)
>         at java.util.concurrent.Executors$RunnableAdapter.
> call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1149)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
>
>
> So it ran out of memory. It's strange as this happens as soon as I click
> "Start pipeline". Pipeline is very simple and it literally git clones 4
> files and should bild nodejs app (very simple).
>
> java process is allocated with 4GB memory from some reason. I don't know
> why. I run it from official template using openshift jenkins-2-centos7
>

the heap defaults to 50% of the container memory limit, but this is also
tunable:

https://github.com/openshift/jenkins/blob/master/2/contrib/s2i/run#L98-L100



>
> Containers:
>   jenkins:
>     Container ID:       docker://c7974464f1c36f5a73fd850dec81e8
> 12fe9ff44109567c6ae1abd0beeac7ed0c
>     Image:              openshift/jenkins-2-centos7@sha256:
> 43a6f1b86c7dd44f79662d035bca1b392fd07eb581e1d0370cb23f325a1afac3
>     Image ID:           docker-pullable://docker.io/
> openshift/jenkins-2-centos7@sha256:43a6f1b86c7dd44f79662d035bca1b
> 392fd07eb581e1d0370cb23f325a1afac3
>
> Node has plenty of memory free:
> [root@master ~]# free -m
>               total        used        free      shared  buff/cache
> available
> Mem:          15507        2940        8127         129        4439
> 12005
> Swap:             0           0           0
>
>
> Any ideas?
>
> Thank you.
>
> Regards,
> TH
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>
>


-- 
Ben Parees | OpenShift
_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to