-
Notifications
You must be signed in to change notification settings - Fork 56
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
Please specify timeout for the Prometheus service HTTP POST call #550
Comments
It's an async future requests call. API server does not wait for response. Closing this. |
@miteshvp is not this session used to call workers asynchronously? I'd suggest to use second FutureSession instance for calling Prometheus |
Actually, its threaded. https://github.com/fabric8-analytics/fabric8-analytics-server/blob/master/bayesian/api_v1.py#L81-L82 so we don't need any other session. |
Yup, I meant that we might need to increase the number of workers for the futuresession? |
@tisnik - I guess 100 is a good enough number for our requests. These sessions are not used to invoke workers at the moment. Workers are invoked via another async flow https://github.com/fabric8-analytics/fabric8-analytics-server/blob/master/bayesian/api_v1.py#L278 I guess we are good here. |
Yup, and what timeout value to choose? In this case it might be let's say from one to five seconds at most. WDYT? |
@tisnik - this is like a nano-sec call. Timeout doesn't make sense here |
@miteshvp yes - in case everything is working as expected. But in reality we'll see network issues that would need to be handled by our service. We can discuss in in a chat rather than there ;) |
fabric8-analytics-server/bayesian/api_v1.py
Line 272 in a9330f7
Most requests to external servers should have a timeout attached, in case the server is not responding in a timely manner. By default, requests do not time out unless a timeout value is set explicitly. Without a timeout, your code may hang for minutes or more.
The text was updated successfully, but these errors were encountered: