will eventual cause heap problem since you are allocating new memory every time you go through this section. The old memory does get reclaimed but can get fragmented over time. These are pretty small strings so I don’t think that is your main problem.
I’m not sure this is related to your problem, but the Particle.variable function isn’t being used properly. You should call Particle.variable once during setup(). For a String, the String object should be a global variable. You don’t notify the system firmware when the value changes; it automatically queries the current value of the underlying variable when it’s requested.
Wow! Do I need more coffee this morning! Thanks @rickkas7.
@martingehrke your code cannot work in this way. The message to cloud describing variables and functions is currently only sent during the setup() function.
I am assuming you mean the String part of my comments. It is possible to use String object without using more memory by setting them to empty and then appending what you want into the String, but it is hard to get it completely correct.
That said I would just declare a global char array and sprintf into it in the exact same way your code does for the STATUS published messages, except the char array should be global in scope (i.e. above all functions where you have the String objects declared right now).