Skip to content
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

GET request hung when body is large(~1M) #262

Closed
eugenekainara opened this issue Mar 30, 2018 · 4 comments
Closed

GET request hung when body is large(~1M) #262

eugenekainara opened this issue Mar 30, 2018 · 4 comments

Comments

@eugenekainara
Copy link

eugenekainara commented Mar 30, 2018

Hi,

I'm trying integrate Eureka server, spring-cloud-gateway and my spring boot application, but I'm see some requests that hung. I've found that issue reproduces only when request body is large.

For STR see example

@spencergibb
Copy link
Member

Turning on debug, I see

2018-04-02 15:47:59.136 DEBUG 6813 --- [ctor-http-nio-8] r.ipc.netty.http.server.HttpServer       : [id: 0x794daa35, L:/127.0.0.1:8881 - R:/127.0.0.1:58280] EXCEPTION: java.io.IOException: Connection reset by peer

java.io.IOException: Connection reset by peer
	at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[na:1.8.0_152]
	at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) ~[na:1.8.0_152]
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[na:1.8.0_152]
	at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[na:1.8.0_152]
	at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) ~[na:1.8.0_152]
	at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288) ~[netty-buffer-4.1.22.Final.jar:4.1.22.Final]
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1108) ~[netty-buffer-4.1.22.Final.jar:4.1.22.Final]
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:345) ~[netty-transport-4.1.22.Final.jar:4.1.22.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131) ~[netty-transport-4.1.22.Final.jar:4.1.22.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) [netty-transport-4.1.22.Final.jar:4.1.22.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) [netty-transport-4.1.22.Final.jar:4.1.22.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) [netty-transport-4.1.22.Final.jar:4.1.22.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) [netty-transport-4.1.22.Final.jar:4.1.22.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) [netty-common-4.1.22.Final.jar:4.1.22.Final]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_152]

@spencergibb
Copy link
Member

Disabling netty http client pooling fixed the issue for me ☹️

@spencergibb
Copy link
Member

@smaldini

@eugenekainara
Copy link
Author

Issue doesn't reproduce with spring-cloud-gateway 2.0.0.RC2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants