What do you mean by "store the logs as files that you archive" ?

Do you mean having two destination for logs, one for the data going into
junit and the other into raw log files?
I only have junit files. If the sum is huge it is because some contains lot
of stdout to have data about the current tests. I can drop them (actually I
parse my own proprietary test result files before generating the xml
files), but that would be a mess to loose important information.

Increasing the memory is not really an option, jenkins is running on a
virtualized server with only 1024Mb of memory and the java is already
swapping to disk
ps shows :

jenkins  28931 37.4 62.6 1358964 640248 ?      Sl   Mar05 1052:16
/usr/bin/java -jar /usr/share/jenkins/jenkins.war
--webroot=/var/run/jenkins/war --httpPort=8080 --ajp13Port=-1




-----
Gaetan




2012/3/2 Sami Tikka <sjti...@gmail.com>

> If you want to save memory, store the logs as files that you archive
> as build artifacts. Storing large logs inline in the junit xml files
> will cost you a lot in memory. But if you have the memory, go for it.
>
> Sun JVM option -XmxNNG sets the heap to NN gigabytes. Run "java -X" to
> see what you can tune. How exactly you change it, depends on your
> platform and the way you start Jenkins.
>
> -- Sami
>
> 2012/3/2 Gaetan <gae...@xeberon.net>:
> > Hello
> >
> > I'm starting to have a java heap error when parsing the junit tests.
> > I have a bunch of 3000 tests that might have some long logs (the total
> size
> > of junit files is around 200 Mb), but I hope jenkins is able to handle
> > this).
> >
> > How can I increase the HEAP size of jenkins ? Or is there a way to fix
> this
> > crash (in the futur, the results size will increase) ?
> >
> > 10:39:52  FATAL: Java heap space
> > 10:39:52  java.lang.OutOfMemoryError: Java heap space
> > 10:39:52      at java.util.Arrays.copyOfRange(Arrays.java:3221)
> > 10:39:52      at java.lang.String.<init>(String.java:233)
> > 10:39:52      at
> > org.dom4j.io.SAXContentHandler.characters(SAXContentHandler.java:299)
> > 10:39:52      at
> >
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.characters(AbstractSAXParser.java:541)
> > 10:39:52      at
> >
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:441)
> > 10:39:52      at
> >
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:819)
> > 10:39:52      at
> >
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:748)
> > 10:39:52      at
> >
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
> > 10:39:52      at
> >
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
> > 10:39:52      at
> >
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
> > 10:39:52      at org.dom4j.io.SAXReader.read(SAXReader.java:465)
> > 10:39:52      at org.dom4j.io.SAXReader.read(SAXReader.java:264)
> > 10:39:52      at
> hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:112)
> > 10:39:52      at hudson.tasks.junit.TestResult.parse(TestResult.java:208)
> > 10:39:52      at hudson.tasks.junit.TestResult.parse(TestResult.java:163)
> > 10:39:52      at hudson.tasks.junit.TestResult.parse(TestResult.java:140)
> > 10:39:52      at
> hudson.tasks.junit.TestResult.<init>(TestResult.java:116)
> > 10:39:52      at
> >
> hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:114)
> > 10:39:52      at
> >
> hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:87)
> > 10:39:52      at hudson.FilePath.act(FilePath.java:788)
> > 10:39:52      at hudson.FilePath.act(FilePath.java:770)
> > 10:39:52      at
> hudson.tasks.junit.JUnitParser.parse(JUnitParser.java:83)
> > 10:39:52      at
> >
> hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:122)
> > 10:39:52      at
> >
> hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:134)
> > 10:39:52      at
> > hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
> > 10:39:52      at
> > hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:703)
> > 10:39:52      at
> >
> hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:678)
> > 10:39:52      at
> >
> hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:656)
> > 10:39:52      at hudson.model.Build$RunnerImpl.post2(Build.java:162)
> > 10:39:52      at
> > hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:625)
> > 10:39:52      at hudson.model.Run.run(Run.java:1433)
> > 10:39:52      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
> >
> > -----
> > Gaetan
> >
> >
>

Reply via email to