Azure Function App server always close connection from browser recently (ERR_CONNECTION_CLOSED)

HLL 0 Reputation points
2024-09-01T12:23:43.78+00:00

Since 1 week ago, we are experiencing connection problem with Azure Function App.

We have a few Function Apps exposed for customers to use our SaaS website. These Function Apps are configured with separate custom domains & certificates for HTTPS & corresponding CORS in Azure portal. They had been working fine for 2 years until recently.

The problem is when the JS code in browser initiates a HTTP request to the function app, most of time we got connection closed by sever.

We dived into Chrome and got some debug log with some findings. In the Chrome network debug log, it shows there connection closed by server at the beginning URL request (SSL handshake).

 

t=1340 [st= 53]      SOCKET_BYTES_SENT

                     --> byte_count = 1840

t=1413 [st=126]      SOCKET_BYTES_RECEIVED

                     --> byte_count = 0

t=1413 [st=126]      SSL_HANDSHAKE_ERROR

                     --> error_lib = 34

                     --> error_reason = 100

                     --> file = "net\socket\socket_bio_adapter.cc"

                     --> line = 158

                     --> net_error = -100 (ERR_CONNECTION_CLOSED)

                     --> ssl_error = 1

t=1413 [st=126]   -SSL_CONNECT

                   --> net_error = -100 (ERR_CONNECTION_CLOSED)

t=1413 [st=126]    SOCKET_CLOSED

t=1413 [st=126] -SOCKET_ALIVE

 

According to Chromium source code, this issue is caused by server side disconnection.

 

// SSL_ERROR_SSL indicates the operation failed within the library. The caller

// may inspect the error queue for more information.

#define SSL_ERROR_SSL 1

 

// A connection was closed (corresponding to a TCP FIN).

NET_ERROR(CONNECTION_CLOSED, -100)

 

The cause of ERR_CONNECTION_CLOSED error is unknown, due to no visibility to underlaying networking infrastructure of Azure Function apps.

This connection issue is quite weird because it only happens in browser. When we simulated these requests in cURL/Postman, there was no issue happen.

Does anyone have similar experience or any idea about this kind issue with Azure Function App? It is quite blocking our business. Thanks in advance.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,911 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.