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

[Bug] Configuration netty.server.max-queued-requests don't work which cause server recieve unlimited request #268

Open
1 of 2 tasks
luoyuxia opened this issue Dec 25, 2024 · 0 comments
Assignees
Labels
bug Something isn't working component=server

Comments

@luoyuxia
Copy link
Collaborator

Search before asking

  • I searched in the issues and found nothing similar.

Fluss version

0.5.0

Minimal reproduce step

Sends unlimited requests to the server and the server will put all of them to the request queue...

What doesn't meet your expectations?

Although configure netty.server.max-queued-requests is 500, the server will still put unlimited(much more than 500) requests to the request queue which will cause the server to run out of the memory and can never restore...
In my env, the server will throw unlimited exceptions:

Caused by: com.alibaba.fluss.exception.UnknownServerException: java.lang.OutOfMemoryError: Cannot reserve 4194304 bytes of direct buffer memory (allocated: 32175177900, limit: 32178700288)
	at java.base/java.nio.Bits.reserveMemory(Bits.java:178)
	at java.base/java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:121)
	at java.base/java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:332)
	at com.alibaba.fluss.shaded.netty4.io.netty.buffer.PoolArena$DirectArena.allocateDirect(PoolArena.java:710)
	at com.alibaba.fluss.shaded.netty4.io.netty.buffer.PoolArena$DirectArena.newChunk(PoolArena.java:685)
	at com.alibaba.fluss.shaded.netty4.io.netty.buffer.PoolArena.allocateNormal(PoolArena.java:212)
	at com.alibaba.fluss.shaded.netty4.io.netty.buffer.PoolArena.tcacheAllocateNormal(PoolArena.java:194)
	at com.alibaba.fluss.shaded.netty4.io.netty.buffer.PoolArena.allocate(PoolArena.java:136)
	at com.alibaba.fluss.shaded.netty4.io.netty.buffer.PoolArena.allocate(PoolArena.java:126)
	at com.alibaba.fluss.shaded.netty4.io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:397)
	at com.alibaba.fluss.shaded.netty4.io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:188)
	at com.alibaba.fluss.shaded.netty4.io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:179)
	at com.alibaba.fluss.shaded.netty4.io.netty.buffer.AbstractByteBufAllocator.ioBuffer(AbstractByteBufAllocator.java:140)
	at com.alibaba.fluss.shaded.netty4.io.netty.channel.DefaultMaxMessagesRecvByteBufAllocator$MaxMessageHandle.allocate(DefaultMaxMessagesRecvByteBufAllocator.java:120)
	at com.alibaba.fluss.shaded.netty4.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:150)

And the request queue is filled with ~25 k requests.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component=server
Projects
None yet
Development

No branches or pull requests

2 participants