Actually we’d need all the info about your arrays and the variables applied to them in that code snippet.
Chances are that you are exceeding any of the array boundaries (e.g. actual_porcentage - I guess percentage - could be too long to fit into TCP_tx_ buffer, or amountOfServersAllowed could be set too high, …)
@ScruffR, thanks for the answer. There you can see the variables involved.
And thanks about the “percentage” correction. My native language is spanish and we write it Porcentaje, so i guess thats where the confusion came from.
Sorry, I wrote a response and then realized that I don't think I know what the problem is and I didn't want to lead you down the wrong path, so I deleted my answer.
What I had pointed out was that you need to keep track of how many sockets you are using. There are currently only 4 sockets available to the user on the photon. Any time I've accidentally tried to use more than 4, I get a fault with SOS blink code. It looked to me since you are allowing 10 connections that you will quickly exceed the number of sockets available.