Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

HTTP server issues #100

@flyaruu

Description

@flyaruu

Hi, got the demo working without trouble, but the httpd server seems flakey, I seem to have two issues:

  • I can call from Firefox, but not from curl as it returns ('curl: (1) Unsupported HTTP version in response'), I've tried HTTP/1.0 and HTTP/1.1, but it does not seem to help.
  • The httpd server seems to die after a few (10-20) requests. If I start the server, open the http:// url in Firefox, I get the 'Hello from Rust!' message, but after a 10-20 requests I get a 'The connection was reset' message. The logs say:
> W (280507) httpd: httpd_accept_conn: error in accept (23)
> W (280507) httpd: httpd_server: error accepting new connection

It only recovers after a reboot.

I see a seemingly related post: https://www.esp32.com/viewtopic.php?t=10179 (but not in Rust)

I've followed the suggested solutions (purging LRU, reducing # of sessions and sockets, to no avail:

    let mut conf: esp_idf_svc::http::server::Configuration = Default::default();
    conf.lru_purge_enable = true;
    conf.max_open_sockets = 1;
    conf.max_sessions = 1;
    let mut server = esp_idf_svc::http::server::EspHttpServer::new(&conf)?;

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions