-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nsq_to_http: 'http-client-request-timeout' flag has no effect #998
Labels
Comments
I think this is because the flag value is used in an func init() {
httpclient = &http.Client{Transport: http_api.NewDeadlineTransport(*httpConnectTimeout, *httpRequestTimeout), Timeout: *httpRequestTimeout}
userAgent = fmt.Sprintf("nsq_to_http v%s", version.Binary)
} |
ahhh, good catch! |
mreiferson
changed the title
nsq_to_http 'http-client-request-timeout' flag seems no effects
nsq_to_http: 'http-client-request-timeout' flag has no effect
Feb 21, 2018
yes, you understand correctly |
kamyanskiy
added a commit
to kamyanskiy/nsq
that referenced
this issue
Feb 22, 2018
…nt_connect_timeout, http-client-request-timeout flags
fixed in #1000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to use nsq_to_http to make POST request when message appears in NSQ to my Flask API. I've tried to increase "http-client-request-timeout" duration that defaults 20s up to 60 sec.
But seems it doesn't take effect.
I added time.sleep(30) to POST request handler in my API, to check that nsq_to_http client waits more than 20s when it makes POST with message to my API.
nsq_to_http starts with command line:
EXPECTED RESULT
nsq_to_http client timeout was increased upto 60 sec , so it should waits successfuly when api is not responded for 30 sec
ACTUAL RESULT
nsq_to_http HTTPPost client drops connection after 20 sec delay.
In logs I see:
The text was updated successfully, but these errors were encountered: