synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <>
Subject [jira] Commented: (SYNAPSE-408) Improve Synapse Memory Footprint under HTTP 1.0
Date Sat, 02 Aug 2008 23:59:44 GMT


Andreas Veithen commented on SYNAPSE-408:

I had a look at the code and the serialization is actually done twice as I suggested above.
I think that your statement that the serialized bytes are stored in the message context for
future use is incorrect. On the other hand you are right that there is a memory issue: in
order to calculate the content length, the message is serialized to a ByteArrayOutputStream,
which is suboptimal because we are not interested in the content itself, but only in the length
of the content. The same result can be achieved with less memory footprint by using CountingOutputStream
and NullOutputStream from commons-io.

> Improve Synapse Memory Footprint under HTTP 1.0
> -----------------------------------------------
>                 Key: SYNAPSE-408
>                 URL:
>             Project: Synapse
>          Issue Type: Improvement
>            Reporter: Saliya Ekanayake
>            Priority: Minor
> Synapse serializes the SOAP envelope in order to calculate the content length of the
message under HTTP 1.0. This serialization is done inside the class Axis2HttpRequest which
is inside the transports module. The serialized bytes are then stored in the message context
for future use by the streamMessageContents() method inside the same class.
> Thus, the entire content of the SOAP envelope is stored inside the memory leading to
a possible out of memory situation when the XML data is large. A solution to this would be
to write some of the data to a permanent storage (like hard disk) based on a threshold value.
The TemporaryData class inside the core module is a good solution to this kind of work. It
would, however, incur a cyclic dependency if used inside the Axis2HttpRequest class. 
> If we can resolve this issue (probably by moving the TemporaryData class to a utility
module and then making the core too depend on that) it will of great use in improving the
memory footprint of Synapse.

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:
For additional commands, e-mail:

View raw message