in reply to Soap calls using multithreading running out of memory

Hello bsshetty17,

Not every module is thread safe: see Thread-Safe-Modules

The module documentation does not mention threads at all: have you checked threds safety of the module?

In addition I do not understand what is the relation between process a file and SOAP.

For multithreading process of a file see MCE of our estimated brother marioroy: he published many examples of processing big file with his module.

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: Soap calls using multithreading running out of memory
by bsshetty17 (Acolyte) on Jan 25, 2017 at 10:14 UTC

    Can you suggest any thread safe module and to create a soap request and get response xml?

      If you're using SSL (https), then maybe the SSL modules are not thread-safe.

      Personally, I would look at running the SOAP transfer in a separate process and avoid threads then.

        SOAP::Lite uses LWP which in the current versions will use IO::Socket::SSL by default for the TLS which then uses Net::SSleay. These modules should be thread safe for a long time already. But it impossible to say what versions of the modules the OP is actually using nor it is possible to point out specific problems without having code to reproduce the problem.

        Yes, I am using HTTPS

Re^2: Soap calls using multithreading running out of memory
by bsshetty17 (Acolyte) on Jan 25, 2017 at 10:12 UTC

    I am processing a file and based on some data in file I am creating a soap request and processing the response.

      Some more info on this....

      I am running perl program with Threads and which uses Soap::Lite also. This is running good in my windows 7(perl 5, version 24, subversion 0 (v5.24.0) built for MSWin32-x64-multi-thread) strawberry perl. While I run the same program in my DEV( HP-UX XXXXXXXX B.11.31 U ia64 2666145408 unlimited-user license ) environment( perl, v5.8.8 built for IA64.ARCHREV_0-thread-multi ) It is throwing "Memory fault(coredump)" Did anyone face similar situation / Do anyone have any suggetion to resolve this?

        5.8.8. is over 10 years old, your dev and production platforms are very different. Are you running the same version of SOAP::Lite and it's dependency trees (their dependencies etc)? I suspect that this will be very different. You were told that SSL modules aren't thread safe. My suggestion would be to try and isolate the problem. Ensure your dev environment is the same (or as close as possible) to production, otherwise you'll spend a lot of time developing something that need to be completely retested on the production platform which may look nothing like the one you built it for, you'll waste a lot of time chasing bugs in differences in the stacks.