Open chrisjsimpson opened 2 years ago
Consider curl parameters
--connect-timeout parameter
-m, --max-time
--connect-timeout <seconds>
Maximum time in seconds that you allow the connection to the
server to take. This only limits the connection phase, once
curl has connected this option is of no more use. Since 7.32.0,
this option accepts decimal values, but the actual timeout will
decrease in accuracy as the specified timeout increases in deci‐
mal precision. See also the -m, --max-time option.
If this option is used several times, the last one will be used.
-m, --max-time <seconds>
Maximum time in seconds that you allow the whole operation to
take. This is useful for preventing your batch jobs from hang‐
ing for hours due to slow networks or links going down. Since
7.32.0, this option accepts decimal values, but the actual time‐
out will decrease in accuracy as the specified timeout increases
in decimal precision. See also the --connect-timeout option.
If this option is used several times, the last one will be used.
Is your feature request related to a problem? Please describe.
When a shop is down, then the shop announcement will fail, the announcement currently happens via a uwsgi cron(not to be confused with cron) curl request , but has no timeout so uses the default (which is?). This causes significant cpu load when shops are offline.
Describe the solution you'd like Consider adding timeout to the curl shop announce uwsgi cron reduced, so that it fails fast.
Describe alternatives you've considered Doing something entirely different
Additional context
man curl
(there might be more than one e.g. connect timeout vs lookup timeout)