Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..
2461 views

How to prevent retry of HTTP request in case of timeout?

My HTTP script behaves the following way in Performance Center 12.20 (script was developed in VuGen 12.50):

1. A request is sent in Sockets mode:
Action.c(727): t=46729ms: Already connected [0] to prep-brokers.com:443   [MsgId: MMSG-26000]
Action.c(727): t=46729ms: 1594-byte request headers for "https://prep-brokers.com/web_property...
...

2. Timeout:
Action.c(727): t=106731ms: Closed connection [0] to prep-brokers.com:443 after completing 30 requests   [MsgId: MMSG-26000]
Action.c(727): t=106731ms: reporting user data point RETRY_KEEP_ALIVE   [MsgId: MMSG-26000]
...

3. Reconnection to host:
Action.c(727): t=106731ms: Connecting [0] to host ...   [MsgId: MMSG-26000]
Action.c(727): t=106732ms: Connected socket [0] from ... to ...  in 1 ms   [MsgId: MMSG-26000]
...

4. Sending the same request 2nd time:
Action.c(727): t=106738ms: 1594-byte request headers for "https://prep-brokers.com/web_property...

Why does it behave this way?
How can I prevent a retry and get a timeout reported by LoadRunner?

0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

Re: How to prevent retry of HTTP request in case of timeout?

Use web_set_max_retries function to configure the retry behavior

0 Likes
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: How to prevent retry of HTTP request in case of timeout?

Thank you Gal,

According to VuGen help:
"The web_set_max_retries function sets the maximum number of retries for a Action Functions. When an error occurs, retry is attempted for HTTP Response Messages 500-599, and for network API errors (HttpSendRequest and so forth). Retry is not attempted for timeouts or function argument errors."

I do not have any 500-599 HTTP error in my case.
To me it looks like a normal timeout.

1. Are you saying that web_set_max_retries() would have an impact on my situation?

2. I do not recall seeing such behaviour in the past.
Is it possible that some particular settings (e.g. RTS or through registry) were applied on this machine?
This situation was observed when this script was executed in Performance Center.

3. What is a default and current value of max_retries()?
How can I get this information?

4. In my other scripts I do not see any attemmpt to send a retry e.g. in case of HTTP 500 or HTTP 503 errors
Does it imply that my max_retry setting is 0?

0 Likes
Highlighted
Trusted Contributor.. Trusted Contributor..
Trusted Contributor..

Re: How to prevent retry of HTTP request in case of timeout?

Did you discover why you get this retries? 

I need do this retries, but i don't want use a manual bucle or something to do it. 

And I need for all errors not only errorrs 5xx

 

Thanks

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.