Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

An ESP32 watchdog can fail to reboot a frozen server because it may be watching the wrong failure, configured only to report a timeout, or being fed by code that is still running even though the service is unusable. In ESP-IDF, the Task Watchdog Timer (TWDT) normally prints a warning and backtrace, then lets the application continue. A reboot requires the timeout to enter the panic path and the panic action to be configured to reset. The Interrupt Watchdog Timer (IWDT) and RTC watchdog monitor different conditions, so neither is automatically an end-to-end test of whether a network server answers clients.

First, identify what is actually frozen

“The server is frozen” can describe several different failures on an ESP32:

  • The entire CPU is stuck in a critical section, with interrupts disabled.
  • A server task is spinning or blocked and no longer completes its work.
  • The network stack is alive, but the application state machine is dead.
  • The application is running and feeding a watchdog, while clients cannot connect because of a socket, protocol, memory, or radio problem.
  • The device has already reset, but boot, flash communication, or application startup is failing.

ESP-IDF’s watchdogs detect specific conditions rather than “server health” in the abstract. The correct diagnosis therefore starts with the failure mode, the ESP-IDF release, the ESP32 variant, and the watchdog configuration used by the project. The behavior below describes the ESP32 target in the current stable ESP-IDF documentation (v6.1), with the main behavior also corroborated by v5.5 and the TWDT panic option by v5.1. Defaults and APIs can differ between releases, chips, project settings, and other frameworks.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How the three ESP-IDF watchdogs differ

Watchdog What it detects Typical coverage Timeout behavior
Interrupt Watchdog Timer (IWDT) Interrupts blocked for too long, including long critical sections or an ISR preventing lower-priority interrupts from running CPU interrupt and tick service, not application-level client responses Normally enters the panic handler; if the handler cannot run, a second stage can hard-reset the chip. Project panic settings can select a direct reset action.
Task Watchdog Timer (TWDT) A subscribed task or watchdog user fails to reset the timer before its timeout CPU idle tasks by default plus tasks or users explicitly subscribed by the application By default, prints a warning and backtrace, then continues running. Panic must be enabled if a timeout should enter the panic path.
RTC_WDT/LP_WDT Boot-time, panic-handling, and low-power-domain conditions, depending on configuration RTC and early-boot or low-power operation Configurable stages can interrupt, reset a CPU, reset the main system, or reset the main system and RTC domain.

These are not interchangeable. An IWDT timeout says that interrupt or tick service was delayed. A TWDT timeout says that a subscribed task or user missed its deadline. An RTC watchdog event may be related to boot or low-power operation. None of those statements alone proves that an HTTP, TCP, MQTT, or other server endpoint is healthy.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

The most common reason: TWDT timeout is warning-only

ESP-IDF documents this default behavior for the TWDT: “On a TWDT timeout the default behaviour is to simply print a warning and a backtrace before continuing running the app.” That is why seeing a task-watchdog message without a reboot can be completely expected.

The timeout raises the watchdog interrupt. The default handler reports the failure, but the application continues unless the project enables panic behavior. To make a TWDT timeout capable of rebooting the device, verify both sides of the chain:

  1. Enable the task-watchdog panic option, CONFIG_ESP_TASK_WDT_PANIC, in the project configuration, or set the equivalent runtime panic behavior where the selected ESP-IDF release supports it.
  2. Check the system panic-handler action. It must be configured to reset, not merely print, halt, or wait for a debugger.
  3. Confirm that the timeout is from the watchdog you intended to use. Changing TWDT panic behavior does not change IWDT or RTC_WDT stages.

The runtime configuration includes a trigger_panic setting in releases that expose TWDT configuration at runtime. Read the generated project configuration and the release-specific API documentation rather than assuming a setting from another ESP-IDF version carries forward unchanged.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A watchdog can monitor the wrong thing

The server task may not be subscribed

TWDT coverage applies to subscribed tasks and users. ESP-IDF subscribes CPU idle tasks by default, but a separate server task is not automatically protected merely because it exists. If the server task enters a spin loop, blocks in an unexpected place, or stops progressing while no subscription represents it, the idle-task watchdog may not identify that task as the cause.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Inspect initialization and confirm that the task responsible for the service is subscribed. Then identify which task or user appears in the watchdog report. A timeout from an idle task can indicate that another task is running too long without yielding; it does not necessarily identify an application endpoint that has stopped responding.

The monitored task can keep feeding while the service is broken

A task watchdog reset is only a signal that the subscribed task or user called its reset function in time. If a server loop continues to execute and calls esp_task_wdt_reset() even though it is returning errors, serving stale state, or unable to reach its backend, the watchdog sees activity and does not time out.

This is an application-design implication of the feed semantics. For service supervision, register a watchdog user that represents a meaningful health checkpoint and call esp_task_wdt_reset_user() only after the required work succeeds. For example, the checkpoint might require processing an input, advancing the protocol state machine, and completing a bounded network transaction. Do not feed solely because the loop iterated.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The failure may be outside the watchdog’s coverage

A device can be unreachable to clients while interrupts, the FreeRTOS tick, and the server task continue to run. Examples include a dead application state machine, a socket resource leak, a radio association failure, an exhausted heap, or a protocol-level deadlock that still allows the task to execute. IWDT and TWDT are not general-purpose synthetic client tests, so they may correctly remain quiet.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Why IWDT does not prove that a server is responsive

The IWDT is principally a detector for prolonged interrupt blocking. It relies on the FreeRTOS tick interrupt to feed the underlying hardware watchdog. Long critical sections, disabled interrupts, or an ISR that monopolizes a CPU can delay that tick and cause an IWDT timeout.

A network service can be completely unusable without blocking interrupts. For example, an application task could wait forever for a condition, repeatedly reject connections, or stop advancing a parser while the scheduler and tick continue normally. In those cases, IWDT has no documented reason to fire.

When IWDT does fire, the default reason is a panic-handler path such as Interrupt wdt timeout on CPU0 or Interrupt wdt timeout on CPU1. If the panic handler cannot run, the second stage can hard-reset the chip. Keep ISRs and critical sections short, and defer substantial work to tasks. An IWDT should protect interrupt latency, not substitute for a service-health watchdog.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Timeout stages are not all resets

ESP-IDF hardware watchdogs have configurable stages. A stage may generate an interrupt, reset one CPU, reset the main system, or, for RTC_WDT, include the RTC domain. A custom setup that stops at an interrupt stage is not equivalent to a system-reset stage.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

When reviewing a non-default configuration, document each stage and its action. A timeout can appear in logs while the chip remains running if the selected stage only interrupts and the handler does not escalate. Conversely, an immediate reset can remove useful panic output. Choose the stage and panic action together so that the failure is both recoverable and diagnosable.

RTC watchdog behavior can be surprising

ESP-IDF also documents RTC_WDT/LP_WDT for boot tracking, panic handling, and low-power use. The RTC watchdog is normally disabled immediately before the application’s main function. If the project is configured to retain it, application code must feed or disable it, or it can reset the device unexpectedly.

RTC_WDT is therefore not a drop-in replacement for a server task watchdog. It is useful when the requirement includes boot or low-power supervision, but its lifecycle and reset domains differ from TWDT and IWDT. Confirm whether the watchdog is active during the part of the lifecycle where the failure occurs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Configure a TWDT reboot deliberately

Use this sequence for an ESP-IDF project. Exact menu labels and defaults can vary by release, so verify them in the documentation for the project’s version.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
  1. Record the environment. Write down the ESP-IDF version, ESP32 variant, target CPU, and whether the project uses the default scheduler and watchdog initialization.
  2. Enable and initialize TWDT. Confirm that the task watchdog is enabled and that its timeout is long enough for the application’s worst legitimate operation. Do not turn an example timeout into a universal value; the correct interval depends on scheduling, flash operations, radio work, and protocol deadlines.
  3. Subscribe the right subject. Add the service task, or a watchdog user representing service completion, rather than relying only on an idle-task subscription.
  4. Feed at a meaningful checkpoint. Call esp_task_wdt_reset() for a subscribed task, or esp_task_wdt_reset_user() for a registered user, only after the required bounded work succeeds.
  5. Enable panic on timeout. Set CONFIG_ESP_TASK_WDT_PANIC or the release-appropriate runtime trigger_panic behavior.
  6. Set the panic action to reset. Verify the project’s system panic-handler setting. A panic path that prints and halts will not provide an automatic reboot.
  7. Test without a debugger breakpoint. Reproduce the failure in a normal run and capture serial output, reset reason, watchdog message, and backtrace.
/* Illustrative supervision pattern; adapt names and error handling to the ESP-IDF release. */
for (;;) {
    bool healthy = process_request_with_deadline() &&
                   advance_protocol_state() &&
                   publish_required_result();

    if (healthy) {
        esp_task_wdt_reset_user(service_health_user);
    }

    vTaskDelay(pdMS_TO_TICKS(10));
}

The example intentionally does not feed when the required checkpoint fails. A real implementation should bound each operation, handle transient errors explicitly, and avoid turning a temporary remote outage into an uncontrolled reboot loop. The watchdog should be the last-resort recovery path, not the only error-handling mechanism.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Use the logs to separate the failure paths

If the log names a task watchdog timeout

  • Note the task or user identified by the report.
  • Inspect its backtrace and the code running immediately before the missed reset.
  • Check whether the task was actually subscribed.
  • Look for a feed call that runs unconditionally, even after the service has failed.
  • Confirm whether panic was enabled and whether the panic action resets.

If the log names an interrupt watchdog timeout

  • Search for long critical sections, disabled interrupts, and high-priority or same-priority ISRs doing substantial work.
  • Move processing out of the ISR and keep interrupt handlers bounded.
  • Check which CPU reported the timeout and what that CPU was expected to run.
  • Do not interpret the event as proof that a server endpoint was the original fault.

If there is a reboot but no useful watchdog report

  • Read the reset reason at the next boot and preserve the serial output from the previous run.
  • Determine whether the reset happened during panic handling, restart, sleep transition, or boot.
  • Investigate boot and flash-communication failures separately from runtime watchdog configuration.
  • Check whether a hardware stage reset too quickly for the panic output to be retained.

Do not trust breakpoint testing

During OpenOCD/JTAG debugging, ESP-IDF documents that the IWDT and TWDT hardware timers are disabled when the CPU stops at a breakpoint and are not re-enabled after leaving the breakpoint. A service that appears to survive indefinitely under a debugger may therefore reset in production, while a breakpoint session cannot validate normal watchdog timing.

Use logging, trace output, a deliberate test fault, or a non-interactive run to verify watchdog operation. If you must debug the failing code interactively, treat watchdog behavior during the halted session as invalid evidence.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A practical diagnosis for a frozen ESP32 server

  1. Classify the symptom. Decide whether clients fail while the CPU still runs, one task stops progressing, interrupts are blocked, or the device has rebooted into a boot problem.
  2. Identify the framework. These details are for ESP-IDF. Arduino-ESP32, another RTOS, or a vendor framework may wrap or configure watchdogs differently.
  3. Capture the exact watchdog output. Record the watchdog class, CPU, task or user, timeout interval, panic message, backtrace, and reset reason.
  4. Map the monitored condition. For IWDT, inspect interrupt latency. For TWDT, inspect subscriptions and feed points. For RTC_WDT, inspect boot and low-power retention.
  5. Verify escalation. A timeout must reach a panic path whose configured action actually resets the intended domain.
  6. Test the health checkpoint. Temporarily force the service-health condition to fail while allowing the task to run. If no timeout occurs, the health user may not be registered, may be fed incorrectly, or may not be initialized.
  7. Repeat outside OpenOCD breakpoints. Confirm the result in a normal production-like run.

Common scenarios and the appropriate fix

Observed behavior Likely explanation What to change
A TWDT warning and backtrace appear, but the application continues Default TWDT behavior is warning and continue Enable TWDT panic and configure the panic handler to reset if automatic recovery is required.
The network server stops answering, but no watchdog message appears The failing service condition is not represented by IWDT or a subscribed TWDT task/user Subscribe the relevant task or health user and feed only after meaningful work succeeds.
The server is broken, but its task keeps feeding The feed call is unconditional or checks only that the loop is scheduled Move the feed after the service-health checkpoint and make the checkpoint bounded.
An IWDT timeout occurs during heavy processing An ISR or critical section blocks the tick for too long Shorten the critical section, reduce ISR work, and defer processing to a task.
Watchdog behavior differs between debugger and deployed firmware OpenOCD/JTAG disables IWDT and TWDT timers at breakpoints Validate timing without breakpoints.
The board resets during startup RTC_WDT retention, boot failure, flash communication, or another reset source Read the reset reason and boot log before changing TWDT settings.

Version and portability limits

The current stable Espressif documentation labels the ESP32 watchdog guide v6.1. A v5.5 watchdog page corroborates the hardware relationship and panic-dependent behavior, while a v5.1 configuration page documents the TWDT panic option. That does not make every default universal. Timeout values, initialization, menu options, API signatures, panic defaults, and chip-specific behavior can change with the ESP-IDF release and target.

Before copying a configuration into another project, check the matching ESP-IDF Programming Guide, generated sdkconfig, target chip documentation, and framework implementation. Do not assume that an Arduino-ESP32 sketch, a different ESP32 family member, or an older IDF release has the same watchdog lifecycle.

What a reliable design looks like

Use each watchdog for the failure it can actually observe:

  • Use IWDT to catch interrupt starvation and excessively long critical sections.
  • Use TWDT subscriptions to catch tasks or health checkpoints that stop meeting their deadlines.
  • Use a health watchdog user when “the task is running” is weaker than “the service completed the work clients need.”
  • Use RTC_WDT only when boot, panic, or low-power-domain supervision is part of the requirement.
  • Configure panic and hardware stages so the timeout action matches the required recovery: report, panic, CPU reset, system reset, or RTC-inclusive reset.
  • Keep logs and reset reasons available so an automatic reboot does not erase the evidence needed to fix the underlying fault.

The key distinction is between execution and health. A loop that continues to run can still be a dead server, and a watchdog fed by that loop will faithfully report that the loop is alive. Automatic reboot becomes dependable only when the monitored signal represents the service outcome that matters, the timeout enters an escalation path, and the final stage is configured to reset the intended system.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.