horitaku1124 / nim_httpserver

HTTP server using nim
0 stars 0 forks source link

Error: unhandled exception: Too many open files #1

Open horitaku1124 opened 6 years ago

horitaku1124 commented 6 years ago
ab -n 10000 -c 100 http://127.0.0.1:8000/
This is ApacheBench, Version 2.3 <$Revision: 1796539 $>
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)
Traceback (most recent call last)
nim_httpserver2.nim(154) nim_httpserver2
asyncdispatch.nim(1010)  runForever
asyncdispatch.nim(1045)  poll
asyncdispatch.nim(179)   processPendingCallbacks
asyncmacro.nim(34)       cb0
nim_httpserver2.nim(150) serveIter
asyncfutures.nim(243)    read
[[reraised from:
nim_httpserver2.nim(154) nim_httpserver2
asyncdispatch.nim(1010)  runForever
asyncdispatch.nim(1045)  poll
asyncdispatch.nim(179)   processPendingCallbacks
asyncfutures.nim(288)    :anonymous
]]
Error: unhandled exception: Too many open files
  asyncnet.accept's lead up to read of failed Future:
    Traceback (most recent call last)
    nim_httpserver2.nim(154) nim_httpserver2
    asyncdispatch.nim(1010)  runForever
    asyncdispatch.nim(1045)  poll
    asyncdispatch.nim(179)   processPendingCallbacks
    asyncfutures.nim(218)    :anonymous
    asyncnet.nim(458)        :anonymous
    asyncfutures.nim(177)    fail
  serve's lead up to read of failed Future:
    Traceback (most recent call last)
    nim_httpserver2.nim(154) nim_httpserver2
    asyncdispatch.nim(1010)  runForever
    asyncdispatch.nim(1045)  poll
    asyncdispatch.nim(179)   processPendingCallbacks
    asyncmacro.nim(34)       cb0
    nim_httpserver2.nim(150) serveIter
    asyncfutures.nim(243)    read [Exception]
apr_socket_recv: Connection reset by peer (104)
horitaku1124 commented 6 years ago

use command before startup

ulimit -n 10000