in reply to Sending large file contents in SOAP call using SOAP::Lite

Is this the error in the SOAP::Lite module or I am using it the wrong way.

Yeah, 1.5GB seems like there might be a problem ... but not where, I doubt its within SOAP::Lite

perl -Mojo -e " b( shift )->slurp->b64_encode->say; int <>; " 49_678_352_bytesfile > 65M-b64ed

This takes about ~130mb on my machine, and around 20mb of that is perl -Mojo itself alone

I can't imagine SOAP::Lite tacking eleven times that amount, maybe one or three temporarily, but not eleven

Without mojo, with File::Slurp+SOAP::Lite, to slurp this 65M b64ed file takes about 74mb, 1500mb/74mb = 20 so still nowhere in the ballpark

I don't feel like looking into it past this; You can try

$soap->serializer()->envelope( method => 'DoThis', $param ),
to see how much memory it takes to compose that request you're using -- shouldn't be 1.5 GB

I imagine it is the response that you're getting (your program is getting) to that request is an xml bomb ... or something else entirely

Also, what is a better way to make a SOAP call with large data

I imagine maybe https://metacpan.org/module/SOAP::Lite#ATTACHMENTS,

or even XML::Compile::XOP

but if your server doesn't accept that :)

Good luck

Replies are listed 'Best First'.
Re^2: Sending large file contents in SOAP call using SOAP::Lite
by Anonymous Monk on Oct 18, 2013 at 17:34 UTC
    I tried serializer code you mentioned on a 34mb file and it almost used up 500MB while it is serializing and I printed the length of the resultant serialized text 47mb. So, the issue is not the size of the SOAP message it is sending or receiving, it is that serialization itself using up too much memory. Do you or anyone see the same issue?