-->
Page 2 of 2

Re: HTTP Post request fails after sometime with error -1

PostPosted: Wed Jul 08, 2020 7:39 am
by m.maazi
I made it to run every 10 seconds and it was the same: 3 to 5 successful post requests and then error -1.
can it be a server issue?

Re: HTTP Post request fails after sometime with error -1

PostPosted: Wed Jul 08, 2020 9:43 am
by pangolin
"Posting all my code might be a problem! It's about 10000 lines of code in 40 pages" - Methinks there are probably some libraries that will do a lot of that for you...I have a firmware library that does WIFI, Async MQTT,NTP,OTA,AsyncWebserver,17x different GPIO types,UPnP,Alexa voice control, presence detection, remnote update, SQL logging and a whole ton more, runs on ESP32 and ESP8266 and STM32 - and thats only 8500 lines...so, already I suspect you are probably doing something wrong.

Anyway...github? If I had $1 for every time someone posted a snippet of code when the real problem was in the part they DIDN'T post...

There may be nothing at all wrong with the code you posted: you will not a get a 100% answer without 100% of the code. You will get a lot of wrong guesses though :)

Re: HTTP Post request fails after sometime with error -1

PostPosted: Wed Jul 08, 2020 1:48 pm
by m.maazi
So... I change my question.
I have an esp module that needs to sync data with a SQL server every 3 seconds. What is the best way to do so?
Thanks for your help.