Hi All,
I have an application which sends HTTP requests at a rate of say 6000 per 
second. In addition, my application also has about 100K goroutines and 
these 6000 requests are basically issued by a subset of these goroutines.

When I increase the rate to more than 6000, I get the error :
"context deadline exceeded (Client.Timeout exceeded while awaiting headers)"

>From a PCAP trace, I have seen that the server does respond within the 
timeout (which I've set to 7s), but the application is not able to probably 
finish reading the response.

>From the code of the HTTP client, I see that there is a timer/ticker which 
is run in the background for every request.

My understanding is that the goroutine which issued the HTTP request was 
not able to get scheduled on a Processor/Thread and hence timed out. 

Possibly due to multiple goroutines becoming Runnable, but not being 
scheduled ?

Is my understanding of why I see timeouts correct ?

If a goroutine starts a timer/ticker, then if it gets taken off a P as it 
is waiting for a Network I/O response, will the timer also pause when it is 
removed from a P by the scheduler ?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/170d0ea2-3a81-4291-8ed7-6a061c376fa6n%40googlegroups.com.

Reply via email to