peritus / robotframework-httplibrary

Robot Framework keywords for HTTP requests
http://peritus.github.com/robotframework-httplibrary/
76 stars 77 forks source link

gai error in consecutive GET requests #34

Open GayanaYJ opened 9 years ago

GayanaYJ commented 9 years ago

I am also encountering this gaierror alot which is a blocker for my testing.

13:28:41.532 FAIL gaierror: [Errno 8] nodename nor servname provided, or not known Below is my observation

I have around 600 uri in array for which i have to do GET request

. When i place it in for loop and send request one by one. I get response for all 247 uri , when it reaches 248 uri it fails there everytime. I have been googling alot but not able to find any relevant fix that i can put in place.

screen shot 2015-04-13 at 1 39 47 pm

cgomeztk commented 8 years ago

@GayanaYJ did you find a fix or workaround for this issue, I'm getting same error trying to request around 600 URI with GET, thanks in advance.

GayanaYJ commented 8 years ago

@cgomeztk : Try inducing sleep of at least 5 second sleep before each consecutive request OR just set the http context once for all test cases(setup context). According to my analysis, this happens when there are too many consecutive API calls and trying to set http context for every call.

cgomeztk commented 8 years ago

hey @GayanaYJ thanks for your quick response, I found a workaround for this as well, I don't use "Create Http Context" keyword because the requests I do not always are to the same host, so I'm sending the absolute URL to the GET or HEAD request instead. So the workaround is adding "Restore Http Context" keyword before calling GET or HEAD, it successfully finished 609 requests, hope that helps. Cheers.

GayanaYJ commented 8 years ago

@cgomeztk : Good to know about this workaround. Thank you