Hi,
I am running OS firmware version 3.3.1 on P1. Recently we have encountered an issue where the P1 goes offline after fast reading multiple Particle.variable() - calculated - after reading about 6 variables in quick succession.
The led keeps blinking like its cloud connected and also Particle.connected() returns true for about 5-15 sec after this happens but device ping fails from the console.
I did some debugging and found that the Particle.variable() reading cloud api when hit in quick succession without waiting for the P1 to return the variable value, due to multi-threading, the P1 gets busy servicing multiple concurrent variable requests and looses Particle cloud connection with Cloud Loop error 1 and sometimes loop error 24.
Additional info -
I have System Thread Enabled and System Mode Manual.
In this temporarily disconnected state, if I call a Particle.function() then P1 receives the function request.
Even when I hit the Device Signal Button from console the P1 led starts blinking rainbow but the P1 ceases to return the Particle.variable() request - giving a temporary cloud disconnection without apparent signs from the led nor from Particle.connected().
I have also tried the running the Particle.variable() function code inside a Single threaded block but cloud disconnection happens.
I have removed Particle.process() from the Particle.variable() function code assuming that the system thread wont kick in to receive a new Particle.variable() request but behaviour repeats.
The only possible solution is adding delays between each subsequent Particle.variable() reading cloud api or waiting for P1 to return the previous result and then hitting the next Particle.variable() reading api again for reading the next variable.
Any help is appreciated.