revoltphp / event-loop

Revolt is a rock-solid event loop for concurrent PHP applications.
MIT License
808 stars 28 forks source link

apr_socket_recv: Connection reset by peer (104) #70

Open kocoten1992 opened 1 year ago

kocoten1992 commented 1 year ago

Hello maintainer, I try http-server example in https://github.com/revoltphp/event-loop/blob/main/examples/http-server.php,

But when using ab tool to benchmark, it result in

This is ApacheBench, Version 2.3 <$Revision: 1901567 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
apr_socket_recv: Connection reset by peer (104)

AFAIK, this is not the problem with ab tool it self, but with the webserver, I'm using default ubuntu server to test it.

kelunik commented 1 year ago

Hi @kocoten1992, what's the exact command you're running?

kocoten1992 commented 1 year ago

Hi, the exact command is:

ab -t 5 -c 4 http://127.0.0.1:8080/

for php http-server, I run it as is https://github.com/revoltphp/event-loop/blob/main/examples/http-server.php.

P/s: I'm using latest php version (php 8.2.0).