transform plugin timeout issue

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

transform plugin timeout issue

Gaurav Bansal
Hi all,

We are writing a transform plugin where we get the data from server, perform some checks on the data & write the data back to the client using following api :
TSVIO TSVConnWrite(TSVConn connp, TSCont contp, TSIOBufferReader readerp, int64_t nbytes)

Here, I am seeing the issue of VC_EVENT_INACTIVITY_TIMEOUT. To explain the issue, let me consider the following two cases :

1) While the data is still coming from the server, parallely we keep sending the data to another module to perform some checks. But in this case, TSVConnWrite is commented out implying that we are not sending data to client. Here, whole of data is fetched from server (which takes say t seconds) and then sent to the module to perform checks. No issues in this case, but we start seeing the issues after uncommenting 'TSVConnWrite' which is explained in case 2 below.

2) In the 2nd case, TSVConnWrite is used to parallely send the data to client. Thus, all the 3 activities of fetching data from the server, sending to another module for performing some checks and sending to client (after the checks) are going on parallely as 3 separate threads. After 'TSVConnWrite' is uncommented, we see the VC_EVENT_INACTIVITY_TIMEOUT while the data is still being fetched from the server. Can anyone please let me know what can be the probable cause of such a timeout ? If we are not writing to TSVConnWrite, timeout doesn't happen during the entire 't' sec duration of download from server. But, if we start writing to 'TSVConnWrite', timeout happens within a duration which is less than t seconds.

thanks,
gaurav
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: transform plugin timeout issue

Gaurav Bansal
Can anyone help me find the root cause for timeout here ? Increasing the timeout value may not provide a solution here, as this issue is seen while downloading a 30mb file and as we download bigger files say for example a 1Gb file, more delays might be seen.

Here are the http logs seen for this :

DEBUG: <HttpSM.cc:2638 (main_handler)> (http) [2] [HttpSM::main_handler, VC_EVENT_INACTIVITY_TIMEOUT]
DEBUG: <HttpSM.cc:883 (state_watch_for_client_abort)> (http) [2] [&HttpSM::state_watch_for_client_abort, V
C_EVENT_INACTIVITY_TIMEOUT]
DEBUG: <HttpSM.cc:923 (state_watch_for_client_abort)> (http) [2] [watch_for_client_abort] forwarding event
 VC_EVENT_INACTIVITY_TIMEOUT to tunnel
DEBUG: <HttpTunnel.cc:1354 (consumer_handler)> (http_tunnel) [2] consumer_handler [user agent VC_EVENT_INA
CTIVITY_TIMEOUT]
DEBUG: <HttpSM.cc:3195 (tunnel_handler_ua)> (http) [2] [&HttpSM::tunnel_handler_ua, VC_EVENT_INACTIVITY_TI
MEOUT]
DEBUG: <Http1ClientSession.cc:287 (do_io_close)> (http_cs) [2] session closed

On Sat, Jun 17, 2017 at 7:11 PM, Gaurav Bansal <[hidden email]> wrote:
Hi all,

We are writing a transform plugin where we get the data from server, perform some checks on the data & write the data back to the client using following api :
TSVIO TSVConnWrite(TSVConn connp, TSCont contp, TSIOBufferReader readerp, int64_t nbytes)

Here, I am seeing the issue of VC_EVENT_INACTIVITY_TIMEOUT. To explain the issue, let me consider the following two cases :

1) While the data is still coming from the server, parallely we keep sending the data to another module to perform some checks. But in this case, TSVConnWrite is commented out implying that we are not sending data to client. Here, whole of data is fetched from server (which takes say t seconds) and then sent to the module to perform checks. No issues in this case, but we start seeing the issues after uncommenting 'TSVConnWrite' which is explained in case 2 below.

2) In the 2nd case, TSVConnWrite is used to parallely send the data to client. Thus, all the 3 activities of fetching data from the server, sending to another module for performing some checks and sending to client (after the checks) are going on parallely as 3 separate threads. After 'TSVConnWrite' is uncommented, we see the VC_EVENT_INACTIVITY_TIMEOUT while the data is still being fetched from the server. Can anyone please let me know what can be the probable cause of such a timeout ? If we are not writing to TSVConnWrite, timeout doesn't happen during the entire 't' sec duration of download from server. But, if we start writing to 'TSVConnWrite', timeout happens within a duration which is less than t seconds.

thanks,
gaurav

Loading...