Multiple runShellCommand process error

Hello all, this is the first time I write in the forum, I apologize if this is not the right place to post my problem.

I'm triying to send two curl commands through runShellCommand("curl..."). They work perfectly if I only send one curl in the loop(), but if I send two commands none of them are executed, the server receives nothing but the loop() is executed again and again, I mean, it doesn't stop.

Have any of you had the same problem? Thanks in advance

#include <Bridge.h>
#include <HttpClient.h>
#include <Console.h>
#include <Process.h>



void setup() {
    Bridge.begin();
    Console.begin();
}

void loop() {

Process p; 
p.runShellCommand("curl number1 ....");
while(p.running()); 
p.close

Process p; 
p.runShellCommand("curl number2....");
while(p.running()); 
p.close();

delay (20000);

}

The p process variable is declared two times in the loop, try to declare it as a Global variable and remove the declaration from the loop or declare it in the loop only one time at the beginning.

Sorry, it was a mistake during the copy-paste in the question, the processes in my code were different (Process p and Process q).

After some time working on it I realized (I think...) that the problem here is the lenght of the curl command... I don't know why, but when I reduce the lenght of the curl it works. As I didn't find any reason for this operation I finally wrote an script to execute the curl command in the linux part, and from the sketch I call it and send the data. I mean...

#include <Bridge.h>
#include <HttpClient.h>
#include <Console.h>
#include <Process.h>



void setup() {
    Bridge.begin();
    Console.begin();
}

void loop() {

Process p; 
"sh /root/script.sh IPdestination " + data1 + " " + data2 + " " + data3);

delay (20000);

}

In the linux side the script executes the curl to the IPdestination and the data.

Anyway, I'll try to understand the primal "malfunction", I'll keep you informed. Any of you have the clue?

Are you sure the loop is running? Make the led blink to be sure of it. If both the curls fail, it may be a memory issue: long strings, low RAM available

Yes Federico, the loop was running because I' was painting in the Console different messages and they were shown.

Have you found a solution to this yet niceday?

Can we see what code you are working with now? If you need to change the url use the same amount of characters. Count them out so we at least can eliminate ram being the issue.