HTTPS Server (OpenSSL) - Error explanation
Posted: Thu Jun 27, 2019 10:51 am
Hello,
I have an ESP32 which is running a wifi soft AP and an HTTPS server using <esp_https_server.h> and <openssl/ssl.h>.
In comparison to HTTP I experience very slow Transfer of web pages paired with some errors, on which I have no idea how to fix them.
This is my log when I attempt to access an URI handler by the client PC (e.g I call 192.168.4.1/index.html):
E (193655) esp_https_server: SSL_new ret NULL (out of memory)
W (193655) httpd: httpd_accept_conn: session creation failed
W (193655) httpd: httpd_server: error accepting new connection
E (193665) httpd: httpd_server: error in select (9)
W (193665) httpd_sess: httpd_sess_delete_invalid: Closing invalid socket 61
W (193675) httpd_sess: httpd_sess_delete_invalid: Closing invalid socket 62
W (193695) esp_https_server: fail to SSL_accept - handshake error
W (193695) httpd: httpd_accept_conn: session creation failed
W (193695) httpd: httpd_server: error accepting new connection
E (193705) httpd: httpd_server: error in select (9)
W (193705) httpd_sess: httpd_sess_delete_invalid: Closing invalid socket 61
Despite these errors the connection is finally established and the page is served. Still very slowly.
I suspect its due to these errors and a lot of retries as result of this.
What can I do to fix this and improve overall performance of the HTTPS server?
I have an ESP32 which is running a wifi soft AP and an HTTPS server using <esp_https_server.h> and <openssl/ssl.h>.
In comparison to HTTP I experience very slow Transfer of web pages paired with some errors, on which I have no idea how to fix them.
This is my log when I attempt to access an URI handler by the client PC (e.g I call 192.168.4.1/index.html):
E (193655) esp_https_server: SSL_new ret NULL (out of memory)
W (193655) httpd: httpd_accept_conn: session creation failed
W (193655) httpd: httpd_server: error accepting new connection
E (193665) httpd: httpd_server: error in select (9)
W (193665) httpd_sess: httpd_sess_delete_invalid: Closing invalid socket 61
W (193675) httpd_sess: httpd_sess_delete_invalid: Closing invalid socket 62
W (193695) esp_https_server: fail to SSL_accept - handshake error
W (193695) httpd: httpd_accept_conn: session creation failed
W (193695) httpd: httpd_server: error accepting new connection
E (193705) httpd: httpd_server: error in select (9)
W (193705) httpd_sess: httpd_sess_delete_invalid: Closing invalid socket 61
Despite these errors the connection is finally established and the page is served. Still very slowly.
I suspect its due to these errors and a lot of retries as result of this.
What can I do to fix this and improve overall performance of the HTTPS server?