Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actix_server.accept:error accepting connection: Too many open files #1090

Open
teochenglim opened this issue Dec 17, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@teochenglim
Copy link

Bug Description

running wrk load test and get too many file open. is this the framework problem or my local problem?

$ python hello.py
INFO:robyn.logger:SERVER IS RUNNING IN VERBOSE/DEBUG MODE. Set --log-level to WARN to run in production mode.
INFO:robyn.logger:Added route HttpMethod.GET /
INFO:robyn.logger:Added route HttpMethod.GET /openapi.json
INFO:robyn.logger:Added route HttpMethod.GET /docs
INFO:robyn.logger:Docs hosted at http://127.0.0.1:8080/docs
INFO:robyn.logger:Robyn version: 0.64.2
INFO:robyn.logger:Starting server at http://127.0.0.1:8080
INFO:actix_server.builder:starting 1 workers
INFO:actix_server.server:Actix runtime found; starting in Actix runtime
INFO:actix_server.server:starting service: "actix-web-service-127.0.0.1:8080", workers: 1, listening on: 127.0.0.1:8080
ERROR:actix_server.accept:error accepting connection: Too many open files (os error 24)
ERROR:actix_server.accept:error accepting connection: Too many open files (os error 24)
ERROR:actix_server.accept:error accepting connection: Too many open files (os error 24)
ERROR:actix_server.accept:error accepting connection: Too many open files (os error 24)
ERROR:actix_server.accept:error accepting connection: Too many open files (os error 24)
ERROR:actix_server.accept:error accepting connection: Too many open files (os error 24)
ERROR:actix_server.accept:error accepting connection: Too many open files (os error 24)

wrk load test

$ wrk -t4 -c400 -d30s http://127.0.0.1:8080/
Running 30s test @ http://127.0.0.1:8080/
  4 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    11.36ms    2.29ms  47.00ms   70.82%
    Req/Sec     4.93k   541.48     7.00k    82.00%
  589076 requests in 30.03s, 64.61MB read
  Socket errors: connect 151, read 175, write 0, timeout 0
Requests/sec:  19617.66
Transfer/sec:      2.15MB

Steps to Reproduce

  1. use the example code and run on Terminal 1
from robyn import Robyn

app = Robyn(__file__)

@app.get("/")
async def h(request):
    return "Hello, world!"

app.start(port=8080)
  1. use wrk to do load test
$ wrk -t4 -c400 -d30s http://127.0.0.1:8080/

Your operating system

MacOS

Your Python version (python --version)

3.11

Your Robyn version

latest

Additional Info

Not quite sure this is framework problem, or my local problem?

@teochenglim teochenglim added the bug Something isn't working label Dec 17, 2024
@sansyrox
Copy link
Member

Hey @teochenglim 👋

Thanks for raising this issue. I am able to replicate it. I am not sure on how to fix it though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants