ETIMEDOUT, Errors and Sleep


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

As always appreciate the community’s help.


This should give you some initial info about that

Thanks for this. Do you, or anyone else, know what time period causes a ETIMEDOUT?

that’s normally when the device is offline. ie you’re trying to remotely call a device function that is actually offline.

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 :wink:

Thanks for responding speedily as always. 5 s would explain our intermiddent issues. Will wait for @marekparticle to shed some light

Hi @stofmike! Sorry indeed for the long delay (and thanks @ScruffR for setting expectations accordingly :slight_smile: ). The ETIMEDOUT window was increased to 20 seconds in 2018.

1 Like

Can we set the etimedout window?

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.

I thought I had responded after you sent this. Thanks for the confirmation