You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "benjamin lefevre (JIRA)" <ji...@apache.org> on 2007/03/02 19:15:50 UTC

[jira] Created: (AXIS2-2285) MTOM sample fails with large files (e.g. 37MB)

MTOM sample fails with large files (e.g. 37MB)
----------------------------------------------

                 Key: AXIS2-2285
                 URL: https://issues.apache.org/jira/browse/AXIS2-2285
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: samples
    Affects Versions: 1.1.1
         Environment: Windows XP, Tomcat 5.5, JRE sun 1.5.0_06
            Reporter: benjamin lefevre


The MTOM sample works fine with files from 0 to 10MB, until I tried to work with a large file (37MB).

I get an OutOfMemoryException on both side (client and server):

client side: 
Exception in thread "main" org.apache.axis2.AxisFault: java.lang.OutOfMemoryError: Java heap space
	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
	at sample.mtom.service.MTOMSampleStub.attachment(MTOMSampleStub.java:141)
	at sample.mtom.client.Client.transferFile(Client.java:119)
	at sample.mtom.client.Client.main(ClientMain.java:71)

server side:
2 mars 2007 18:52:28 org.apache.axis2.transport.http.AxisServlet doPost
GRAVE: java.lang.OutOfMemoryError: Java heap space

I am a bit disapointed, since I was thinking that MTOM would permit to upload large file over SOAP/HTTP streaming without requiring extra-memory. I set the JVM's (tomcat and client) with large heap size (using -Xmx1024m option). Do I miss something ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2285) MTOM sample fails with large files (e.g. 37MB)

Posted by "portnet mc (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570957#action_12570957 ] 

portnet mc commented on AXIS2-2285:
-----------------------------------

	 i have used axis2-1.3 to download a big file  ,there's ok . but
   when i try to  upload a big file of size 300M ,there is an error as follows :

org.apache.axis2.AxisFault: Java heap space
	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
	at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:579)
	at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)

I have enabled "MTOM" & "filecaching" both in the client side and server side by following code :
    <parameter name="enableMTOM">true</parameter>
    <parameter name="enableSwA">true</parameter>

    <!--Uncomment if you want to enable file caching for attachments -->
    <parameter name="cacheAttachments">true</parameter>
    <parameter name="attachmentDIR">C:\\upload\\tep</parameter>
    <parameter name="sizeThreshold">4000</parameter>


		options.setProperty(Constants.Configuration.ENABLE_MTOM,
				Constants.VALUE_TRUE);
		options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
		
		options.setProperty(Constants.Configuration.CACHE_ATTACHMENTS,
				Constants.VALUE_TRUE);
		options.setProperty(Constants.Configuration.ATTACHMENT_TEMP_DIR,
				TempDir);
		
		options
				.setProperty(Constants.Configuration.FILE_SIZE_THRESHOLD,
						"4000");
		options.setProperty(
				Constants.Configuration.CONFIG_CONTEXT_TIMOUT_INTERVAL,
				"10000000");
				
Maybe there is something wrong with my properties , Can some one suggest solution?

> MTOM sample fails with large files (e.g. 37MB)
> ----------------------------------------------
>
>                 Key: AXIS2-2285
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2285
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: samples
>    Affects Versions: 1.1.1
>         Environment: Windows XP, Tomcat 5.5, JRE sun 1.5.0_06
>            Reporter: benjamin lefevre
>
> The MTOM sample works fine with files from 0 to 10MB, until I tried to work with a large file (37MB).
> I get an OutOfMemoryException on both side (client and server):
> client side: 
> Exception in thread "main" org.apache.axis2.AxisFault: java.lang.OutOfMemoryError: Java heap space
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
> 	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
> 	at sample.mtom.service.MTOMSampleStub.attachment(MTOMSampleStub.java:141)
> 	at sample.mtom.client.Client.transferFile(Client.java:119)
> 	at sample.mtom.client.Client.main(ClientMain.java:71)
> server side:
> 2 mars 2007 18:52:28 org.apache.axis2.transport.http.AxisServlet doPost
> GRAVE: java.lang.OutOfMemoryError: Java heap space
> I am a bit disapointed, since I was thinking that MTOM would permit to upload large file over SOAP/HTTP streaming without requiring extra-memory. I set the JVM's (tomcat and client) with large heap size (using -Xmx1024m option). Do I miss something ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-2285) MTOM sample fails with large files (e.g. 37MB)

Posted by "benjamin lefevre (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

benjamin lefevre resolved AXIS2-2285.
-------------------------------------

    Resolution: Invalid

> MTOM sample fails with large files (e.g. 37MB)
> ----------------------------------------------
>
>                 Key: AXIS2-2285
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2285
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: samples
>    Affects Versions: 1.1.1
>         Environment: Windows XP, Tomcat 5.5, JRE sun 1.5.0_06
>            Reporter: benjamin lefevre
>
> The MTOM sample works fine with files from 0 to 10MB, until I tried to work with a large file (37MB).
> I get an OutOfMemoryException on both side (client and server):
> client side: 
> Exception in thread "main" org.apache.axis2.AxisFault: java.lang.OutOfMemoryError: Java heap space
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
> 	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
> 	at sample.mtom.service.MTOMSampleStub.attachment(MTOMSampleStub.java:141)
> 	at sample.mtom.client.Client.transferFile(Client.java:119)
> 	at sample.mtom.client.Client.main(ClientMain.java:71)
> server side:
> 2 mars 2007 18:52:28 org.apache.axis2.transport.http.AxisServlet doPost
> GRAVE: java.lang.OutOfMemoryError: Java heap space
> I am a bit disapointed, since I was thinking that MTOM would permit to upload large file over SOAP/HTTP streaming without requiring extra-memory. I set the JVM's (tomcat and client) with large heap size (using -Xmx1024m option). Do I miss something ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2285) MTOM sample fails with large files (e.g. 37MB)

Posted by "Thilina Gunarathne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477578 ] 

Thilina Gunarathne commented on AXIS2-2285:
-------------------------------------------

Please switch "ON" file caching at the server side... 

Following article might help you..
http://wso2.org/library/264

The client side exception seems to me as the error sent back from the server.. 

Please let us know whether the above solves your problem, so that we can close this issue...

> MTOM sample fails with large files (e.g. 37MB)
> ----------------------------------------------
>
>                 Key: AXIS2-2285
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2285
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: samples
>    Affects Versions: 1.1.1
>         Environment: Windows XP, Tomcat 5.5, JRE sun 1.5.0_06
>            Reporter: benjamin lefevre
>
> The MTOM sample works fine with files from 0 to 10MB, until I tried to work with a large file (37MB).
> I get an OutOfMemoryException on both side (client and server):
> client side: 
> Exception in thread "main" org.apache.axis2.AxisFault: java.lang.OutOfMemoryError: Java heap space
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
> 	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
> 	at sample.mtom.service.MTOMSampleStub.attachment(MTOMSampleStub.java:141)
> 	at sample.mtom.client.Client.transferFile(Client.java:119)
> 	at sample.mtom.client.Client.main(ClientMain.java:71)
> server side:
> 2 mars 2007 18:52:28 org.apache.axis2.transport.http.AxisServlet doPost
> GRAVE: java.lang.OutOfMemoryError: Java heap space
> I am a bit disapointed, since I was thinking that MTOM would permit to upload large file over SOAP/HTTP streaming without requiring extra-memory. I set the JVM's (tomcat and client) with large heap size (using -Xmx1024m option). Do I miss something ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2285) MTOM sample fails with large files (e.g. 37MB)

Posted by "Thilina Gunarathne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477665 ] 

Thilina Gunarathne commented on AXIS2-2285:
-------------------------------------------

>-with small files (<1MB), the process on server side is never ending (running endless); but I can see that the file has correctly been received and >dumped into the file system.
Unfortunately a bug got surfaced with 1.1.1(may be while we are trying to do an optimization) where the outstream is not getting flushed at the end.. 
Please try with latest axiom snapshots.. This issue is fixed there...

>-with very large file(~600MB), I always got the same error: java.lang.OutOfMemoryError. 
I'll look in to it... Earlier I have succesfully transmitted more than 800 mb without any errors... 
By any chance are you trying to read or print the content of the file at the server side.. When handling very large files it is adviced to always deal with the cached file through the data handler, without getting it loaded to the memory..


> MTOM sample fails with large files (e.g. 37MB)
> ----------------------------------------------
>
>                 Key: AXIS2-2285
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2285
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: samples
>    Affects Versions: 1.1.1
>         Environment: Windows XP, Tomcat 5.5, JRE sun 1.5.0_06
>            Reporter: benjamin lefevre
>
> The MTOM sample works fine with files from 0 to 10MB, until I tried to work with a large file (37MB).
> I get an OutOfMemoryException on both side (client and server):
> client side: 
> Exception in thread "main" org.apache.axis2.AxisFault: java.lang.OutOfMemoryError: Java heap space
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
> 	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
> 	at sample.mtom.service.MTOMSampleStub.attachment(MTOMSampleStub.java:141)
> 	at sample.mtom.client.Client.transferFile(Client.java:119)
> 	at sample.mtom.client.Client.main(ClientMain.java:71)
> server side:
> 2 mars 2007 18:52:28 org.apache.axis2.transport.http.AxisServlet doPost
> GRAVE: java.lang.OutOfMemoryError: Java heap space
> I am a bit disapointed, since I was thinking that MTOM would permit to upload large file over SOAP/HTTP streaming without requiring extra-memory. I set the JVM's (tomcat and client) with large heap size (using -Xmx1024m option). Do I miss something ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2285) MTOM sample fails with large files (e.g. 37MB)

Posted by "benjamin lefevre (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12477599 ] 

benjamin lefevre commented on AXIS2-2285:
-----------------------------------------

Dear Thilina,

Actually after my post, I tried to enable file caching after having read this user-guide at: http://ws.apache.org/axis2/1_1_1/mtom-guide.html .

And it does not solve my issue. Worse, I get another one.:
-with small files (<1MB), the process on server side is never ending (running endless); but I can see that the file has correctly been received and dumped into the file system.
-with very large file(~600MB), I always got the same error: java.lang.OutOfMemoryError.

I've the same issue on two different computer (Windows OS: XP (1GB) and Vista (2GB)).
 

> MTOM sample fails with large files (e.g. 37MB)
> ----------------------------------------------
>
>                 Key: AXIS2-2285
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2285
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: samples
>    Affects Versions: 1.1.1
>         Environment: Windows XP, Tomcat 5.5, JRE sun 1.5.0_06
>            Reporter: benjamin lefevre
>
> The MTOM sample works fine with files from 0 to 10MB, until I tried to work with a large file (37MB).
> I get an OutOfMemoryException on both side (client and server):
> client side: 
> Exception in thread "main" org.apache.axis2.AxisFault: java.lang.OutOfMemoryError: Java heap space
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
> 	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
> 	at sample.mtom.service.MTOMSampleStub.attachment(MTOMSampleStub.java:141)
> 	at sample.mtom.client.Client.transferFile(Client.java:119)
> 	at sample.mtom.client.Client.main(ClientMain.java:71)
> server side:
> 2 mars 2007 18:52:28 org.apache.axis2.transport.http.AxisServlet doPost
> GRAVE: java.lang.OutOfMemoryError: Java heap space
> I am a bit disapointed, since I was thinking that MTOM would permit to upload large file over SOAP/HTTP streaming without requiring extra-memory. I set the JVM's (tomcat and client) with large heap size (using -Xmx1024m option). Do I miss something ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2285) MTOM sample fails with large files (e.g. 37MB)

Posted by "benjamin lefevre (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478125 ] 

benjamin lefevre commented on AXIS2-2285:
-----------------------------------------

Ok, now it's working. I had set the parameters for MTOM in the wrong file (services.xml instead of axis2.xml). My apologizes.

> MTOM sample fails with large files (e.g. 37MB)
> ----------------------------------------------
>
>                 Key: AXIS2-2285
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2285
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: samples
>    Affects Versions: 1.1.1
>         Environment: Windows XP, Tomcat 5.5, JRE sun 1.5.0_06
>            Reporter: benjamin lefevre
>
> The MTOM sample works fine with files from 0 to 10MB, until I tried to work with a large file (37MB).
> I get an OutOfMemoryException on both side (client and server):
> client side: 
> Exception in thread "main" org.apache.axis2.AxisFault: java.lang.OutOfMemoryError: Java heap space
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
> 	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
> 	at sample.mtom.service.MTOMSampleStub.attachment(MTOMSampleStub.java:141)
> 	at sample.mtom.client.Client.transferFile(Client.java:119)
> 	at sample.mtom.client.Client.main(ClientMain.java:71)
> server side:
> 2 mars 2007 18:52:28 org.apache.axis2.transport.http.AxisServlet doPost
> GRAVE: java.lang.OutOfMemoryError: Java heap space
> I am a bit disapointed, since I was thinking that MTOM would permit to upload large file over SOAP/HTTP streaming without requiring extra-memory. I set the JVM's (tomcat and client) with large heap size (using -Xmx1024m option). Do I miss something ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2285) MTOM sample fails with large files (e.g. 37MB)

Posted by "Thilina Gunarathne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571101#action_12571101 ] 

Thilina Gunarathne commented on AXIS2-2285:
-------------------------------------------

I don't see anything wrong with your config.. Do you see any temporary files in the directory you mentioned.. 

May be you are doing something in your service logic that causes the attachment to be loaded to memory.. 

> MTOM sample fails with large files (e.g. 37MB)
> ----------------------------------------------
>
>                 Key: AXIS2-2285
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2285
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: samples
>    Affects Versions: 1.1.1
>         Environment: Windows XP, Tomcat 5.5, JRE sun 1.5.0_06
>            Reporter: benjamin lefevre
>
> The MTOM sample works fine with files from 0 to 10MB, until I tried to work with a large file (37MB).
> I get an OutOfMemoryException on both side (client and server):
> client side: 
> Exception in thread "main" org.apache.axis2.AxisFault: java.lang.OutOfMemoryError: Java heap space
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:271)
> 	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
> 	at sample.mtom.service.MTOMSampleStub.attachment(MTOMSampleStub.java:141)
> 	at sample.mtom.client.Client.transferFile(Client.java:119)
> 	at sample.mtom.client.Client.main(ClientMain.java:71)
> server side:
> 2 mars 2007 18:52:28 org.apache.axis2.transport.http.AxisServlet doPost
> GRAVE: java.lang.OutOfMemoryError: Java heap space
> I am a bit disapointed, since I was thinking that MTOM would permit to upload large file over SOAP/HTTP streaming without requiring extra-memory. I set the JVM's (tomcat and client) with large heap size (using -Xmx1024m option). Do I miss something ?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org