cancel
Showing results for 
Search instead for 
Did you mean: 

VIrtual Traffic Manager: handling slow responses with TrafficScript

Occasional Visitor

VIrtual Traffic Manager: handling slow responses with TrafficScript

A user has a php application request that takes a very long time to complete (2-3 minutes) and doesn't return any data until it is complete. The application logs show that Apache is completing the request, but vTM times out using typical virtual server and pool timeout settings. I can set the virtual server and pool timeouts to very large values and the application works as expected. However, I'd rather use a TrafficScript rule to set the timeout for just these requests, rather than have ridiculously large timeout values for everything.

 

I know I can use request.setVirtualServerTimeout() to set the virtual server timeout, but is there a way to set the pool timeout with TrafficScript? Or is there a better way to handle this?

 

vTM17.3, Apache back end serving multiple websites

1 REPLY 1
Visitor

Re: VIrtual Traffic Manager: handling slow responses with TrafficScript

Hello fosterray,

 

You should be able to use:

request.setMaxReplyTime( seconds )

Per the TScript Guide: Overrides the pool's max reply time for this request, also overriding the virtual server timeout if necessary. A node must start its reply within this time or it will be timed out.

 

Example:

if( http.getMethod() == "POST" ) {
# Allow more time to send data to server.
request.setMaxReplyTime( 60 );
}

 

Hope this helps!