We are seeing some “errors” and “sleep” on one of our webhooks in the graph under the configuration of the webhook. When does a “sleep” event occur and when does a “error” occur?
Eg
50430 success
314 error
802 sleep
Also, Does anyone know how long particle waits for a response? We are seeing some “ETIMEDOUT” errors and are trying to understand the cause. We have received the message but particle is saying it has timed out waiting for a response
Thanks. But this is not calling a function on a device. It is when a device has published something and the web hook is attempting to connect to our server to post the data. There are times when an error is generated and we see a ETIMEDOUT.
It used to be a meager 5 seconds timeout but since some users also had slow responding servers to target that was increased. But I don't know whether this was a per client or general setting, nor do I know what the time would be now.
@marekparticle would probably know or be able to investigate - but given the time of the year it may take some time to get a response
Hi @stofmike! Sorry indeed for the long delay (and thanks @ScruffR for setting expectations accordingly ). The ETIMEDOUT window was increased to 20 seconds in 2018.
20 seconds may be handy for some, but for others with cloud functions calling the particle function URL and waiting for the timedout it means those scripts are running for an extra 15 seconds.
i suppose we could rewrite to check the api to see if the device is online first. then again the particle api isn’t particularly fast. particle list [deviceid] was spinning it’s wheels for 60 seconds on the cli today for me.