[
https://issues.apache.org/jira/browse/AXIS2C-862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567974#action_12567974
]
Manjula Peiris commented on AXIS2C-862:
---------------------------------------
In the current implementation it reallocates the whole buffer when ever it
reads from the stream. I changed the current logic to first allocates a large
buffer and read whole message to it. Then I removed most of the AXIS2_MALLOC
calls and instead kept pointers for those in the buffer.(New source code is
attached). For example in the new logic it uses new buffers to keep the
soap_body_str and to keep the mime_binary. All the other in between memory
allocations has being removed. I think we can't reduce memory usage in the
mime_parse_parse method than this. (even with a array of buffer approach) .
The results are quite promising. With Apache2 current implementation uses
around 1100MB to process a 40MB attachment. But with the modification it uses
around 400MB. I don't think we can reduce this any more from Axis2.
But the problem is httpd does not release the acquired memory. So even with
this fix the server cannot handle more than 10 requests. Previously it is 2.
Solution for this is to use our own apr_allocator. But Sandesah2/C have
problems with this.
> Sending big binary data fails
> -----------------------------
>
> Key: AXIS2C-862
> URL: https://issues.apache.org/jira/browse/AXIS2C-862
> Project: Axis2-C
> Issue Type: Bug
> Environment: Ubuntu 7.04
> Reporter: Lahiru Gunathilake
> Assignee: Manjula Peiris
>
> I used mtom sample in Axis2c.And i tried to send a file which is a size of
> 1GB.In client side it give this soap fault.
> I used this command to run mtom sample
> ./mtom http://localhost:8080/axis2/services/mtom resources//VTS_01_1.VOB
> <ns1:mtomSample
> xmlns:ns1="http://ws.apache.org/axis2/c/samples/mtom"><ns1:fileName>test.jpg</ns1:fileName><ns1:image><xop:Include
> href="cid:[email protected]"
> xmlns:xop="http://www.w3.org/2004/08/xop/include"/></ns1:image></ns1:mtomSample>
> Recieved Fault :
> <soapenv:Fault><faultcode>env:Sender</faultcode><faultstring>NULL parameter
> was passed when a non NULL parameter was
> expected</faultstring><detail><EchoServiceError/></detail></soapenv:Fault>
> In server side It gives this output
> Echo client ERROR: attachment is missing.
> I've done the samething giving file which have the size of 700MB.It works
> fine with simple axis server.
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]