Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Soap calls using multithreading running out of memory

by bsshetty17 (Acolyte)
on Jan 25, 2017 at 08:43 UTC ( [id://1180276]=perlquestion: print w/replies, xml ) Need Help??

bsshetty17 has asked for the wisdom of the Perl Monks concerning the following question:

I have requirement to process a file using multi threading. I have implemented it using threads and queues. I Also use soap calls using soap::Lite.

Multi threading works as expected without soap. When I implement it with soap call, The script dies out with "Memory fault(coredump)" error. However when I do this with thread count = 1 or single thread, the program works as expected. Please suggest a possible fix for this if anyone experienced this earlier.Thanks.

  • Comment on Soap calls using multithreading running out of memory

Replies are listed 'Best First'.
Re: Soap calls using multithreading running out of memory
by Discipulus (Canon) on Jan 25, 2017 at 09:11 UTC
    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.

      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.

      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?

Re: Soap calls using multithreading running out of memory
by Anonymous Monk on Jan 25, 2017 at 08:55 UTC

    Well ... try depends.exe or other debugger to get an idea of the area where the memory fault lies,

    then shorten and shorten program to reproduce the error without external dependencies ...

    basically create an test case bug report

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1180276]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-25 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found