ESP32 freezes out of nowhere. Destination Host Unreachable

Posts: 123
Joined: Thu Jan 31, 2019 2:32 pm

ESP32 freezes out of nowhere. Destination Host Unreachable

Postby GeorgeFlorian1 » Thu Jul 18, 2019 8:44 am

OS: Linux Mint 19.1
Board: ESP32-EVB
IDE: PlatformIO IDE
platform =

Hello !

I am using ESPAsyncWebServer to serve some web-pages and to control the 2 relays that are on the board.
The ESP is configured with a static IP:

Code: Select all

if(!WiFi.config(local_IP_STA, gateway_STA, subnet_STA, local_IP_STA, primaryDNS)) {
         logOutput((String)"Couldn't configure STATIC IP ! Starting DHCP IP !");
The issue I am having is that the ESP freezes randomly with no DEBUG message. I have set the DEBUG level at Verbose: build_flags = -DCORE_DEBUG_LEVEL=5.

I am also using the following methods in order to prevent the ESP from freezing, but they don't help at all. With or without them I can't make the project reliable.

Code: Select all

  esp_wifi_set_ps (WIFI_PS_NONE);
I get the following browser error:

Code: Select all

This site can’t be reached
And pinging the ESP ends with Destination Host Unreachable.

The issue I am experiencing makes the ESP a very unreliable board. I don't know if it's the ESP at fault or the Server's Library.

The `void loop()` is pretty straight forward:

Code: Select all

void loop(){
  if (shouldReboot) {
    logOutput("Restarting in 5 seconds...");
  currentTimeRelayOne = millis();
  currentTimeRelayTwo = millis();

  if(startTimeRelayOne != 0 && !needManualCloseRelayOne) {
    if ((currentTimeRelayOne - startTimeRelayOne) > (Delay1.toInt()*1000)) {
      status1 = "OFF";
      logOutput((String)relay1 + " closed");
      startTimeRelayOne = 0;

  if(startTimeRelayTwo != 0 && !needManualCloseRelayTwo) {
    if ((currentTimeRelayTwo - startTimeRelayTwo) > (Delay2.toInt()*1000)) {
      status2 = "OFF";
      logOutput((String)relay2 + " closed");
      startTimeRelayTwo = 0;

Posts: 2
Joined: Fri Oct 26, 2018 10:06 am

Re: ESP32 freezes out of nowhere. Destination Host Unreachable

Postby NivruttiMahajan » Mon Dec 30, 2019 7:57 am

Hey GeorgeFlorian1,
I am also facing the same issue, have u solved it?

Who is online

Users browsing this forum: No registered users and 19 guests