Also when I reduce the `connectionGroupSize` to 1 ...
# ktor
Also when I reduce the
to 1 the error disappears
Which ktor version are you using? 0.9.4?
@Deactivated User Yes this is on 0.9.4
okay, can you provide more information?
operating system + distro + version, jvm version
Windows 10 Pro - 1803 JVM 1.8.0_111 HotSpot
For reference in the thread: When load testing with Ktor with Netty as engine I get the following message:
Copy code
[nettyCallPool-4-20] WARN - returned prematurely 512 times in a row; rebuilding Selector
What does this exactly mean? I use the following for testing:
Copy code
ab -k -n 100000 -c 500 <http://localhost:8080/test>
(edited) I only get this result with Keep-Alive enabled
what’s the summary/output of ab?
Copy code
This is ApacheBench, Version 2.3 <$Revision: 1748469 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, <>
Licensed to The Apache Software Foundation, <>

Benchmarking localhost (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requests

Server Software:        ktor-server-core/0.9.4
Server Hostname:        localhost
Server Port:            8080

Document Path:          /test
Document Length:        11 bytes

Concurrency Level:      500
Time taken for tests:   4.325 seconds
Complete requests:      100000
Failed requests:        0
Keep-Alive requests:    100000
Total transferred:      20700000 bytes
HTML transferred:       1100000 bytes
Requests per second:    23121.63 [#/sec] (mean)
Time per request:       21.625 [ms] (mean)
Time per request:       0.043 [ms] (mean, across all concurrent requests)
Transfer rate:          4674.00 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       1
Processing:     6   21   6.9     20     117
Waiting:        6   21   6.9     20     117
Total:          6   21   6.9     20     117

Percentage of the requests served within a certain time (ms)
  50%     20
  66%     21
  75%     22
  80%     23
  90%     30
  95%     35
  98%     40
  99%     44
 100%    117 (longest request)
so all the requests went fine even with the server errors, right?
Yeah it seems it is happening after the connection closes.
searching with google found this:
I have seen that one, it is linking to which is resolved with
and Ktor is using
so it should be resolved
“I hope this was fixed by #7806 . If not please re-open” then maybe you should request them to reopen 🙂
explaining that it happens to you in windows
because they reproduced that in linux i guess
Ok I will pick it up over there. Thanks Carlos
👍 1
let us now if they address it, to bump to the right netty version
Ok I will