java.lang.OutOfMemoryError: Java heap space

I have a file of 30MB to be written to the MySQL database. I am doing this in Axis web services and it gives me the following error:

java.lang.OutOfMemoryError: Java heap space; nested exception is:

java.lang.OutOfMemoryError: Java heap space

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:

{http://xml.apache.org/axis/}hostname:dbr221d.dbr.louisville.edu

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:633)

at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)

at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)

at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)

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:148)

at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)

at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)

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 edu.louisville.bcc_ma.ws.lab.LabServiceSoapBindingStub.storeGZIPFile(LabServiceSoapBindingStub.java:472)

at edu.louisville.bcc_ma.lims.labclient.container.SendGZIPFile.sendFile(SendGZIPFile.java:69)

at edu.louisville.bcc_ma.lims.labclient.container.LoginContainer.login(LoginContainer.java:58)

at edu.louisville.bcc_ma.lims.labclient.container.LoginContainer.main(LoginContainer.java:44)

I am using Tomcat as the application server and Apache as the web server, Axis 1.3 and MySQL standard 5.0.20a version. I have set the minimum and maximum heap size and it works well without using the web service (just uploading and downloading from the database using a simple java program). Another thing to notice is that I can send a file of almost 10MB size to the database using web service without any problem. But it doesn't work with the 30 MB .

Can someone please help me?

[3654 byte] By [anteena] at [2007-10-3 0:50:55]
# 1
What is your JVM settings, what is your system resources. Do you have other app runningon this server... Usually bumping up -Xms,-Xmx will help. Have you tried a larger size for -Xmx ?
gcollins1a at 2007-7-14 17:46:01 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
My VM arguments are -XX:NewSize=128m -XX:MaxSize=128m -XX:SurvivorRatio=8 -Xms512m -Xmx512m. I set this in Eclipse 3.1.2 . I use axis 1.3 Operating system: Fedora Core . Yes I tried setting larger sizes even. It didn't work
anteena at 2007-7-14 17:46:01 > top of Java-index,Java HotSpot Virtual Machine,Specifications...