Sorry for that, but we have answered this kind of question already hundreds of times with all sorts of possible reasons, but if you show your code we might spot the one reason that applies to your issue and saves us the extra reiteration of all the non-issues.
With your input from the previous message, I found out why the Photon was losing connectivity and recycling.
The reason is that I am using the Thingspeak library (writeFields) function and was using this function with small intervals (I found out that Thingspeak likes updates to be more than 15 seconds apart).
However, in my application, I receive data from a sensor at uncontrolled intervals (depending on the Environment). So is there an example that shows how I can queue the .writeField statements to give Thingspeak a chance to accept them?
In a different application that did not use Thingspeak (just Particle.Publish), I used the PublishQueue library. However, in this case, I am not sure what to do.
I would appreciate any help in that regard and thanks in advance.
I haven’t got an off the shelf solution, but if you look at the implementation of the Particle.publish() queue you could reuse that code to implement your own Thingspeak queue.
Or maybe @thingspeak can chime in on this.
There are a few examples in the ThingSpeak documentation that show how to collect several samples in a buffer and then post them all as a bulk update. You can bulk update about every 15 seconds with multiple messages. Here is an example for a particle photon. For your application, you can asynchronously store your updates and then send the bulk update request when your buffer gets to a certain length.