How to start jenkins service with increased java heap memory

10,967 views
Skip to first unread message

zakyn

unread,
Mar 25, 2012, 8:17:53 AM3/25/12
to Jenkins Users
Hello,

I would like to ask you how to start jenkins service with increased
java heap memory
I would like to start jenkins with this java setting but my jenkins is
running as a windows service.

Is it possible to start jenkins service with these parameters -Xms512m
-Xmx2048m ? Does it mean that java for jenkins will use this setting?

Thank you for your help.

Vladimir

Richard Lavoie

unread,
Mar 25, 2012, 9:15:17 AM3/25/12
to jenkins...@googlegroups.com
Can't you open the services panel (run -> services.msc) and change the service start command to add these 2 additionnal parameters ?

Richard

Vladimir Zak

unread,
Mar 25, 2012, 12:00:25 PM3/25/12
to jenkins...@googlegroups.com
Hi Richard,

I have tried that but after computer restart the parameters were not
there not at all :(

Vladimir

2012/3/25 Richard Lavoie <lavoie....@gmail.com>:

Manuel Doninger

unread,
Mar 25, 2012, 12:20:11 PM3/25/12
to jenkins...@googlegroups.com
In your Jenkins home directory there should be a file named config.xml.
In that file you can add configuration options for your service,
environment variables etc.
In the line with the startup command for Jenkins just add your parameters.

Regards,
Manuel

Vladimir Zak

unread,
Mar 26, 2012, 2:34:15 AM3/26/12
to jenkins...@googlegroups.com
Hi,

Thank you for a help but I am not able to find the any startup command
for jenkis.
Could you please add here the small snippet of xml file?

Thanks.

Vladimir

2012/3/25 Manuel Doninger <man...@doninger.net>:

Jan Seidel

unread,
Mar 26, 2012, 3:52:04 AM3/26/12
to Jenkins Users
Hi Vladimir,

actually is it the file jenkins.xml/respectively hudson.xml not
config.xml...

--- SNIP ---
<executable>java</executable>
<arguments>-Dhudson.DNSMultiCast.disabled=true -Xrs -Xmx256m -
Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%
\jenkins.war" --httpPort=8080</arguments>
--- SNAP ---

Question is here, does it make sense to put the heap size with -Xms to
512 megs. Puttimg the value too high will eventually result in the
exact opposite behaviour as wanted. I have one server running with
assigned memory of 21 gigabyte but the heap size is 256meg and running
fine. Bringing the heap size higher did result in performance loss and/
or even java to fail at runtime.

Take care
Jan

On 26 Mrz., 08:34, Vladimir Zak <zakvladi...@gmail.com> wrote:
> Hi,
>
> Thank you for a help but I am not able to find the any startup command
> for jenkis.
> Could you please add here the small snippet of xml file?
>
> Thanks.
>
> Vladimir
>
> 2012/3/25 Manuel Doninger <man...@doninger.net>:
>
>
>
>
>
>
>
> > In your Jenkins home directory there should be a file named config.xml.
> > In that file you can add configuration options for your service,
> > environment variables etc.
> > In the line with the startup command for Jenkins just add your parameters.
>
> > Regards,
> > Manuel
>
> > On Sun, Mar 25, 2012 at 18:00, Vladimir Zak <zakvladi...@gmail.com> wrote:
> >> Hi Richard,
>
> >> I have tried that but after computer restart the parameters were not
> >> there not at all :(
>
> >> Vladimir
>
> >> 2012/3/25 Richard Lavoie <lavoie.rich...@gmail.com>:
> >>> Can't you open the services panel (run -> services.msc) and change the service start command to add these 2 additionnal parameters ?
>
> >>> Richard
>

Christine Ching

unread,
Apr 20, 2020, 7:59:15 AM4/20/20
to Jenkins Users
hi there, 

jenkinerror.png

I encounter the above error. After talking to perforce support, i was asked to increase the heap size for jenkins. I try to edit the jenkins.xml to change from 256 to 512/2048 and restart jenkins. After that jenkins is not able to work at all. Kindly advise how to fix the issue.

Thanks.

Mark Waite

unread,
Apr 23, 2020, 9:20:44 PM4/23/20
to Jenkins Users
Likely there is a syntax error in the changes you made to the configuration file.  Revert to the previous configuration file.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0521ab21-6db8-42b3-b202-ed7d744db730%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages