We have some running AWS EC2 servers, our clients use libcurl to send HTTP request (POST) to those server with their public DNS, the servers might be shutdown without notifying clients, then our clients need almost 50 seconds to finish a request and then get 504 error, does anybody know if there is a way to reduce this time to a few seconds?
Asked
Active
Viewed 496 times
0
-
50 seconds is A LOT. What does it do during all that time? Figuring that out might help deciding how to act... – Daniel Stenberg Oct 15 '14 at 12:16
1 Answers
0
Curl has two parameters that let you tune your timeouts: --connect-timeout and --max-time
In your case, I guess --connect-timeout
is the one you're looking for.
Beware: lowering this setting means you'll assume a timeout even if the backend servers are up and just take longer than usual to answer the request.

ffflabs
- 17,166
- 5
- 51
- 77