Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    catiga
    @catiga
    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?
    Thanks
    belkirdi
    @belkirdi
    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
    @smaldini
    @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 :
    @Override
        public void customize(NettyReactiveWebServerFactory factory) {
    //        factory.addServerCustomizers(httpServer -> httpServer.wiretap(true));
            super.customize(factory);
        }
    itsccn
    @itsccn
    Where can I learn the tutorial of netty?
    Enrico Olivelli
    @eolivelli
    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
    @normanmaurer
    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
    @eolivelli
    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
    @normanmaurer
    @eolivelli np
    Enrico Olivelli
    @eolivelli
    Norman Maurer
    @normanmaurer
    yes
    that said we already kind of work around this by using Unsafe ;)
    Enrico Olivelli
    @eolivelli
    Yep. Btw Netty is the 'the safest way to use Unsafe' :)
    Norman Maurer
    @normanmaurer
    lol
    we try hard
    Mark Paluch
    @mp911de
    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
    @normanmaurer
    hmm strange
    would it be possible to check with wireshark ?
    Mark Paluch
    @mp911de
    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
    @normanmaurer
    @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
    @mp911de
    No need to rush. Thanks a lot.
    Norman Maurer
    @normanmaurer
    asked for a few more details in the issue :)
    Knut Schleßelmann
    @kschlesselmann
    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)
    @ActiveProfiles("test")
    @AutoConfigureWireMock(port = 0)
    @Import(OAuth2TestConfiguration::class)
    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)
                .parallel()
                .runOn(Schedulers.parallel())
                .flatMap { evaluateVariation(it, rules) }
                .sequential()

    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
    @ehiggs
    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
    @ehiggs
    oei im using reusing sockets for multiple requests so it's moot. whoopsie! :)
    Norman Maurer
    @normanmaurer
    It’s most likely a IOException
    kerr
    @hepin1989
    阿里新零售消息团队招人,p7岗位,欢迎私聊。
    radhakrishnanch
    @radhakrishnanch
    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.
    AndiHappy
    @AndiHappy
    @hepin1989 邮箱?
    kerr
    @hepin1989
    Joe
    @JoeKerouac
    蚂蚁金服招聘开始了,有兴趣的可以投简历到guanhua.qgh@antfin.com,也可以加微信qiao1213812243私聊勾搭
    Ghost
    @ghost~57515e62c43b8c601976895d
    Hi, anybody knows how to get access to the ChanelId in java 11?
    Maven says following:
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project server: Compilation failure
    [ERROR] /Application.java:[138,109] io.netty.channel.Channel.id() in package io.netty.channel is not accessible
    [ERROR]   (package io.netty.channel is declared in the unnamed module, but module io.netty.channel does not read it)
    kamisama-rney
    @kamisama-rney

    Hi! I'm trying to use the tc-native library to dynamically load the FIPS compliant OpenSSL library inside Finagle. When I make the call to

    io.netty.internal.tcnative.SSL.fipsModeSet(1)

    I'm getting an unsatisfied link error

    java.lang.UnsatisfiedLinkError: io.netty.internal.tcnative.NativeStaticallyReferencedJniMethods.sslOpCipherServerPreference()I
        at io.netty.internal.tcnative.NativeStaticallyReferencedJniMethods.sslOpCipherServerPreference(Native Method)
        at io.netty.internal.tcnative.SSL.<clinit>(SSL.java:67)

    I'm currently running on a MacBook but the ultimate location for this is Linux. Any help on where to look to solve this is appreciated.

    Niranjan
    @nnanda2016

    Hi, can anybody help me. I am trying to provide a custom Logging handler to print request and response details.

    public class CustomLogger extends LoggingHandler {
        public CustomLogger(Class<?> clazz) {
            super(clazz);
        }
    
        @Override
        protected String format(ChannelHandlerContext ctx, String event, Object arg) {
            if (arg instanceof ByteBuf) {
                ByteBuf msg = (ByteBuf) arg;
                return decode(msg, msg.readerIndex(), msg.readableBytes(), defaultCharset());
            }
            return super.format(ctx, event, arg);
        }
    
        private String decode(ByteBuf src, int readerIndex, int len, Charset charset) {
            if (len != 0) {
                byte[] array;
                int offset;
                if (src.hasArray()) {
                    array = src.array();
                    offset = src.arrayOffset() + readerIndex;
                } else {
                    array = allocateUninitializedArray(max(len, 1024));
                    offset = 0;
                    src.getBytes(readerIndex, array, 0, len);
                }
                return new String(array, offset, len, charset);
            }
            return "";
        }

    But this does not print response content correctly

    response headers are printed correctly, but response body is printed like this
    e�Ak�0
          ���й;�;��z襗�>lY�
    what could be the reason?