Webhook timeout for ESP's

@Dmitriy we have approx 5400 webhook calls per day i.e. every 16s. Over 99.9% succeed but a handful may fail each day and this can lead to an ESP WDT reset, even with a yield() just before and just after the call.

Anyway of setting a timeout for the webhook in line with ESP’s WDT?

Could you please explain what do you mean? I didn’t get it.

@Dmitriy the nature of the internet means some webhook calls will take “too long” i.e. server / internet congestion. If it takes more than a few seconds the ESP will fail the watchdog timer and reset.
So could you code up on the server / app a bail out action like this pseudo code:

long ESPwatchdog = 1500;
long startWebhook = millis();
Blynk.virtualWrite(Vx webhookTrigger);
if(millis() > startWebhook + ESPwatchdog){
  // kill webhook request
}

Yes. But Blynk is asynchronous. That means your handler is not affected with webhook failure or success.

1 Like