drogonframework / drogonframework/drogon

Program exit caused by file descriptor exceeding limit

Open
#1,190 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
14.3k
Forks
1.4k
Avg merge
1d 13h
Merged PRs (30d)
14

Description

**Describe the bug**
Example "simple_reverse_proxy" exited because of fd over the limit.

**To Reproduce**
Steps to reproduce the behavior:
1. Turn off the WIFI or Plug out the cable.
2. Startup the program.
3. Send HTTP request using short connection.
4. See Many sockets in CLOSE_WAIT.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [ubuntu 18.04]
- Compiler [gcc 7.5]

**Additional context**
The reason may be that when 'Socket::connect' return a ENETUNREACH error, the TcpClient will never be destoryed.
HttpClientImpl create a TcpClient and set 'retry_' to false.Then the Connector of TcpClient tries to connect, but gets a ENETUNREACH error. The Connector will not add itself to a new Channel unless it gets EINPROGRESS or else. No one handles the ENETUNREACH error. HTTP requests using the reverse proxy HttpClientImpl will remain in the buffer queue forever.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.