JS Max Execution Timeout & Fcount repeated

Hi everyone,

We have a Chirpstack v3 instance working in an IoT controller with 11 LoRaWAN connected to the network server via a RAK Wireless Gateway (using the Chirpstack packet forwarder).

In the beginning we were having several errors “execute js error:execution timeout”. Looking at the forum, we saw that we could change this timeout in the toml file of the application server, and we did so with the “100ms” value as it’s put in the example. But we kept having the execution timemout error (less times, but still significant).

We have tried to increase this number to “1000ms”, and now it looks like we don’t have any execution timeout. But we have found a strange behavior in some sensors: looking at the device data section of these devices, we sometimes see that the same message is repeated more than once, with the same fcount. I’ve attached a picture showing this behavior.

If this happens, shouldn’t chirpstack raise an error of type “UPLINK_FCNT_RETRANSMISSION” “frame counter did not increment”? Shouldn’t the network server discard repeated messages based on the fcount value? Could this happen because of the increase of the execution timeout of the codec function?

In fact, I would like to know which drawbacks can you have if you increase the max_execution_timeout of the codec functions. I guess it’s not good practice to increase this number to very high values… But I can’t think of the specifics.

Thank you in advance,


Is your codec over complicated?
Do you put your nodes too close to the gateway?

The codec is not over complicated… it’s the codec provided by ELSYS manufacturer with slight changes that don’t represent more lines of code.

And yes, some of these devices are quite close to the gateway (5-10m approximately). I couldn’t place them further.

5-10m is fine.
We may see duplicated fCnt if the nodes are placed too near (less than 1m).