CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Timeout from perl script when calling the webservice

 



AnnShinoy
New User

Dec 21, 2011, 3:04 AM

Post #1 of 6 (1258 views)
Timeout from perl script when calling the webservice Can't Post

I am calling a java code from perl that queries the DB ,sets the retrieved data to a webservice api and sends the webservice call. But the webservice call stops after some time (with the exception read timed out) based on the value configured in CGITimeout attribute in IIS (I am linking perl in IIS). Increasing the CGITimeout is not a valid solution for me.

Is there any way to make the perl script to run until all the data from the DB is being processed? (Using system/fork/wait)


rovf
Veteran

Dec 21, 2011, 4:30 AM

Post #2 of 6 (1253 views)
Re: [AnnShinoy] Timeout from perl script when calling the webservice [In reply to] Can't Post

Hmmm... The question in the text of your posting somehow does not math the title of the post.

Of course you can continue executing your Perl program, while a background task is running. There are several ways how to do it. You can for example use fork/exec (respectively system(1,...)) to launch the process in background. See the perlipc and perlport pages for more information.

Timing out a process is a different matter. For this, you can use the alarm function.


AnnShinoy
New User

Jan 2, 2012, 2:10 AM

Post #3 of 6 (1210 views)
Re: [rovf] Timeout from perl script when calling the java ( calls a webservice) [In reply to] Can't Post

But even though I use system after the specified time in CGITimeout in IIS the execution of perl stops.

Is there any way I can overcome this limitation from IIS to execute a perl file?

Code



      
    


rovf
Veteran

Jan 2, 2012, 2:30 AM

Post #4 of 6 (1207 views)
Re: [AnnShinoy] Timeout from perl script when calling the java ( calls a webservice) [In reply to] Can't Post

Did you use system("cmd"), or system(1,"cmd"), as I suggested?


AnnShinoy
New User

Jan 2, 2012, 10:28 PM

Post #5 of 6 (1189 views)
Re: [rovf] Timeout from perl script when calling the java ( calls a webservice) [In reply to] Can't Post

Yes. Even if i try to start a background job, the IIS stops it prematurely.


rovf
Veteran

Jan 3, 2012, 1:49 AM

Post #6 of 6 (1181 views)
Re: [AnnShinoy] Timeout from perl script when calling the java ( calls a webservice) [In reply to] Can't Post

For clarification: IIS kills the *background* job, or the *foreground* job?

Could you post the lines around the system(1,...) call?

How are you waiting for the background job?

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives