Subscribie / subscribie-deployer

Subscribie-deployer sets the initial settings and config needed for a new shop during sign-up. You don't need this to run Subscribie locally. You do need this if you want to work on the onboarding/sign-up process.
https://subscribie.co.uk/#start-now
0 stars 1 forks source link

Consider adding timeout to announce-shop url to prevent long timeouts #36

Open chrisjsimpson opened 2 years ago

chrisjsimpson commented 2 years ago

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

elliottmotson commented 2 years ago

Consider curl parameters --connect-timeout parameter -m, --max-time From curl manpages

--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.