Skip to main content
Visitor II
May 16, 2025
Question

NetX Duo HTTP Server: Blocking Behaviour with Long-Running Requests

  • May 16, 2025
  • 0 replies
  • 297 views

Hi everyone,

I'm currently working with the STM32H573G-DK board using the Nx_WebServer example (NetX Duo HTTP server) provided in STM32CubeMX. During testing, I noticed what seems to be a blocking behaviour, and I’d like to verify whether this is expected or if there’s a way to handle it differently.

Here's the scenario I tested:

  • I modified the server to simulate a long-running request by adding a `tx_thread_sleep()` delay (~20 seconds) before sending the HTTP response.

  • While this delayed request is being processed, the client sends a second HTTP request that should be answered immediately.

  • However, the second request does not get processed until the first (delayed) request finishes and the response is sent.

This suggests that the HTTP server is processing requests sequentially, and a single long-running request can block all other requests, which is problematic for use cases like long polling.

  1. Is this single-threaded, blocking behaviour expected for the NetX Duo HTTP server?

  2. Has anyone found a workaround or implemented a custom solution to handle concurrent HTTP requests?

Any insights or experiences are much appreciated!

    This topic has been closed for replies.