Skip to content

Tcp connection is not closed #100

@yejiayu

Description

@yejiayu

I'm doing performance testing for an HTTP server built on actix-web.

On my server, set ulimit -n 1024 while simultaneously opening 1200 connections on another server for performance testing.

When too many open files error occurs in the HTTP server, I kill the HTTP performance test program, and then checked the server's TCP connection status (netstat -na | grep server_port) and found that many TCP connections were in the CLOSE_WAIT state and waited for several hours without release connections.

I found the code where too many open files happened.

fn accept(&mut self, token: usize) {

Based on this code I have 2 questions

  1. Will the entire HTTP server stop working after accept returns?
  2. Could it cause the connection not to drop?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions