# 服务端 python server.py -s 1 # 启动后查看, 可以看到是多个进程 ps -ef | grep "python server.py" # If num_processes is ``None`` or <= 0, we detect the number of cores # available on this machine and fork that number of child processes.
# 服务器的并发连接数超过了其承载量,服务器会将其中一些连接关闭 Get Get "http://127.0.0.1:5001/sleep": read tcp 127.0.0.1:40056->127.0.0.1:5001: read: connection reset by peer Get Get "http://127.0.0.1:5001/sleep": read tcp 127.0.0.1:40058->127.0.0.1:5001: read: connection reset by peer Get Get "http://127.0.0.1:5001/sleep": read tcp 127.0.0.1:40432->127.0.0.1:5001: read: connection reset by peer Get Get "http://127.0.0.1:5001/sleep": read tcp 127.0.0.1:40436->127.0.0.1:5001: read: connection reset by peer Get Get "http://127.0.0.1:5001/sleep": read tcp 127.0.0.1:40060->127.0.0.1:5001: read: connection reset by peer Get Get "http://127.0.0.1:5001/sleep": read tcp 127.0.0.1:40062->127.0.0.1:5001: read: connection reset by peer Get Get "http://127.0.0.1:5001/sleep": dial tcp 127.0.0.1:5001: i/o timeout Get Get "http://127.0.0.1:5001/sleep": dial tcp 127.0.0.1:5001: i/o timeout Get Get "http://127.0.0.1:5001/sleep": dial tcp 127.0.0.1:5001: i/o timeout Get Get "http://127.0.0.1:5001/sleep": dial tcp 127.0.0.1:5001: i/o timeout