-
Bug
-
Resolution: Unresolved
-
Major
I get Out of memory errors when uploading files to Confluence (v5.1.2). This happens with files > 25 MB.
[confluence] - Uploading file: Ipsos.MediaCell_v2.8_PanelistWebsite.zip (application/zip) ERROR: Unable to upload file... AxisFault faultCode: \{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException faultSubcode: faultString: java.lang.OutOfMemoryError: Java heap space; nested exception is: java.lang.OutOfMemoryError: Java heap space faultActor: faultNode: faultDetail: {}faultData:null \{http://xml.apache.org/axis/}hostname:barral java.lang.OutOfMemoryError: Java heap space; nested exception is: java.lang.OutOfMemoryError: Java heap space at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:606) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1741) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2898) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at jenkins.plugins.confluence.soap.v1.ConfluenceserviceV1SoapBindingStub.addAttachment(ConfluenceserviceV1SoapBindingStub.java:4896) at com.myyearbook.hudson.plugins.confluence.ConfluenceSession.addAttachment(ConfluenceSession.java:181) at com.myyearbook.hudson.plugins.confluence.ConfluenceSession.addAttachment(ConfluenceSession.java:201) at com.myyearbook.hudson.plugins.confluence.ConfluencePublisher.performAttachments(ConfluencePublisher.java:241) at com.myyearbook.hudson.plugins.confluence.ConfluencePublisher.perform(ConfluencePublisher.java:314) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726) at hudson.model.Run.execute(Run.java:1601) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:241)
Unfortunately, there's not much I can do to fix that. I haven't tried uploading a 25MB file via the plugin. You might need to increase your java heap space given to the Jenkins server. Can you tell what the upward limit is for the attachment in your JVM?
There's only one way to add an attachment in this API, and if the axis client is unable to attach it within the JVM heap provided, the plugin will not be able to do anything to fix that. From the Confluence documentation, it states: