-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Server only accepts limited requests #39
Comments
Changed to default number of threads. You may extend 'createWorkerEventLoopGroup()' method in subclass. That's a quick fix, not necessary the best one. |
How much will the default be ? |
See io.netty.channel.MultithreadEventLoopGroup#DEFAULT_EVENT_LOOP_THREADS
Maybe, you should tune boss EventLoopGroup ?com.github.kpavlov.jreactive8583.AbstractIso8583Connector#getBossEventLoopGroup |
As per netty boss eventlookgroup should always be 1. |
To limit the number of concurrent connections to your server - on a UNIX system - you can set the ulimit on file descriptors before running the application, and, once all descriptors are open, other clients will be unable to connect. To get the number of allowed file descriptors, exec |
Hi, I think I did not make the issue very clear (Apologies for that), The OS would always have a limitation, however usually what the API does is that, on the same port it keeps accepting requests with a unique identifier and works in non blocking mode. Expected scenario : Current scenario : There is an API called jPOS which has implemented the expected scenario, we can have detailed a discussion if you are free? |
@mrtechit, Can you share your test please? |
Hi, Then, protected EventLoopGroup createWorkerEventLoopGroup() { Let me know if you need more information. |
Hi, Any luck with this ? |
Hi @kpavlov, |
If you do a blocking job - it deplets the thread pool and will eventually explode. Make sure the blocking job is executed on worker group event loop and increase # of workers as a workaround |
I increased the worker group count, but nothing changed, it seems every listener has one dedicated thread:
If you have an example I would appreciated if you share it with me, by the way I can turn my blocking job to non-blocking by using CompletableFuture. |
@kpavlov Hi, Thanks for this library we have used it in our Production for a couple of years now, |
The server only accepts limited requests due to blocking of listeners.
The below code in abstractiso8583 connector decides the number:
protected EventLoopGroup createWorkerEventLoopGroup() {
return new NioEventLoopGroup(Runtime.getRuntime().availableProcessors());
}
How can we the server non blocking to accept more connections ?
There is 1 option to increase worker threads is what i see, :
return new NioEventLoopGroup(10);
or maybe use netty pipelinefactory ?
The text was updated successfully, but these errors were encountered: