Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Dong, Ji-gong
    Please do not send useless messages
    When is it called?
    Norman Maurer
    @itsccn you can call it when you want to wait until the channel is closed
    Anybody know the reason that Netty suggest to init event loop thread quantity with CPU cores multiply by two
    Meaning only four work threads on two CPU cores, and four concurrent request will hold the 100% threads resource, no more request could be handled.
    Whether my understanding about this correct?
    you can set by doing
    @Bean public ReactiveWebServerFactory reactiveWebServerFactory() { NettyReactiveWebServerFactory factory = new NettyReactiveWebServerFactory(); factory.addServerCustomizers(builder -> builder.loopResources(LoopResources.create("my-http", 16, true))); return factory; }
    or from java argument
    java -jar your-app.jar -Dreactor.ipc.netty.workerCount=16
    The number that you got is the default one
    Stephane Maldini
    @belkirdi please file an issue we can track that for 0.8.9/0.9.0.M2
    (are you sure you are customizing the bean, i tend to use something like like :
        public void customize(NettyReactiveWebServerFactory factory) {
    //        factory.addServerCustomizers(httpServer -> httpServer.wiretap(true));
    Where can I learn the tutorial of netty?
    Enrico Olivelli
    Hello, as you know io.netty.tryReflectionSetAccessible on Java 9+ is disabled by default and this makes Netty unable to do its tweaks and create direct buffers using its special way.
    Is there any plan to find a workaround or any open discussion on OpenJDK mailing lists ?
    Wouldn't it be better to set io.netty.tryReflectionSetAccessible=true by default or at least print a WARN log message that tells that is is better to turn on that switch ? Otherwise people that are moving from Java8 to Java 11 will suffer a performance drop without even knowing that Netty is working in this (bad) mode.
    Norman Maurer
    as long as you use a PooledByteBufAllocator (which is default) the drop is not really bad
    and people complained about warning logs etc before
    that is why we switched
    Enrico Olivelli
    Oh now I understand why there is not so much documentation and warnings about io.netty.tryReflectionSetAccessible.
    Thank you @normanmaurer for your quick answer !
    Norman Maurer
    @eolivelli np
    Enrico Olivelli
    Norman Maurer
    that said we already kind of work around this by using Unsafe ;)
    Enrico Olivelli
    Yep. Btw Netty is the 'the safest way to use Unsafe' :)
    Norman Maurer
    we try hard
    Mark Paluch
    I'm running into a NotSslRecordException when using TLS 1.2 or TLS 1.3. It works with TLS 1.1. I'm not sure whether this is a bug on my side or in netty. The issue is somewhat tricky to reproduce because it happens during Azure SQL Server SSL negotiation in the first receive phase.
    Norman Maurer
    hmm strange
    would it be possible to check with wireshark ?
    Mark Paluch
    I recorded the traffic via LoggingHandler. With SQL Server, SSL negotiation is prefixed with a 8-byte header. Currently on writing an issue. I'll attach the wireshark dump
    Norman Maurer
    @mp911de thanks… will try to have a look soon but I am traveling to Apple HQ today and will sit in meetings most of the next 10 days
    so not sure how long it will take me
    Mark Paluch
    No need to rush. Thanks a lot.
    Norman Maurer
    asked for a few more details in the issue :)
    Knut Schleßelmann
    Hi there. Currently we see tests running indefinitly on our jenkins (not on our local machines). I tried to debug this with the reactor channel and we broke it down to the threaddump containing a lot of
    "nioEventLoopGroup-3-2" #71 prio=10 os_prio=0 cpu=333.55ms elapsed=392.07s tid=0x00007fc3ee367800 nid=0x24b runnable  [0x00007fc3b5be3000]
       java.lang.Thread.State: RUNNABLE
            at sun.nio.ch.EPoll.wait(java.base@11.0.3/Native Method)
            at sun.nio.ch.EPollSelectorImpl.doSelect(java.base@11.0.3/EPollSelectorImpl.java:120)
            at sun.nio.ch.SelectorImpl.lockAndDoSelect(java.base@11.0.3/SelectorImpl.java:124)
            - locked <0x00000000e6f826b8> (a io.netty.channel.nio.SelectedSelectionKeySet)
            - locked <0x00000000e6f6b048> (a sun.nio.ch.EPollSelectorImpl)
            at sun.nio.ch.SelectorImpl.select(java.base@11.0.3/SelectorImpl.java:136)
            at io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
            at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:791)
            at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:439)
            at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:906)
            at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
            at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
            at java.lang.Thread.run(java.base@11.0.3/Thread.java:834)
       Locked ownable synchronizers:
            - None
    The test itself uses somefancy Spring/Spring Cloud features like
    @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
    @AutoConfigureWireMock(port = 0)
    internal class FeederClientTest(

    There's some business logic involved which is starting a parallel flux

        fun evaluateVariations(variations: Set<Variation>, rules: Set<Rule>): Flux<Variation> = Flux.fromIterable(variations)
                .flatMap { evaluateVariation(it, rules) }

    and if we remove the parallel part it's running fine on jenkins as well. Any ideas?

    The rest of our discussion can be seen in https://gitter.im/reactor/reactor
    Ewan Higgs
    Hi! If I cant connect to a host/port I get ConnectException. If I have a connection but the host goes away, is it still ConnectException or is there another exception type I should be looking for?
    Ewan Higgs
    oei im using reusing sockets for multiple requests so it's moot. whoopsie! :)
    Norman Maurer
    It’s most likely a IOException
    Hi , i am using netty as part of spring webflux application. We are facing an issue with netty, connectins are not getting closed with clients. when I do a ‘netstat’ , can see lot connections are there with established state. Same application tested with tomcat.. no connection issue there. Please help.
    @hepin1989 邮箱?