Closed martinvisser closed 4 years ago
Since this seems to be linked with Netty's native support, did you try changing the "netty-tcnative-boringssl-static" dependency?
You could try the following:
netty-tcnative.version
set to 2.0.30.Final
netty-tcnative.version
set to 2.0.31.Final
Please let us know if this changes things, it would help us to find the source of the problem. Thanks!
This seems to be caused by https://github.com/reactor/reactor-netty/issues/1152
Could you try overriding the reactor-netty dependency to the latest 0.9.9.BUILD-SNAPSHOT and this if this fixes the issue?
Thanks!
You can override reactor-bom.version
to Dysprosium-BUILD-SNAPSHOT
. We've also switched Spring Boot 2.2.9.BUILD-SNAPSHOT
to use this version by default so in an hour or so you could just switch your build to 2.2.9.BUILD-SNAPSHOT
.
@bclozel Overriding the version to 0.9.9.BUILD-SNAPSHOT worked again as expected! No more excessive sockets opened.
Thanks @martinvisser this is helping a lot!
reactor-netty is available in v0.9.10.RELEASE. Which spring boot release is planned to contain this version?
Reactor Dysprosium-SR10 ships with reactor-netty 0.9.10, see #22376. As for this particular issue, Dysprosium-SR9 (reactor-netty 0.9.9) should already fix the problem in Spring Boot 2.3.2 (see #21938).
If you're still experiencing an issue, please create a ticket on the reactor-netty tracker with your findings.
@jeehunseo Can you check that you do not have dependencies mismatch? Carefully check the dependencies that may pack Netty and especially the native parts of Netty.
@violetagg Thanks. The reporter has now created a separate issue so I suggest we follow-up there.
I still have this problem in version spring-boot 2.6.6
We recently upgraded from Spring Boot 2.2.7 to 2.2.8, running on PCF (Azure, OS is linux). Now we just ran into an issue where the app crashed in the end with "Too many open files". "files" actually were open TCP sockets, over 1 million. As there are quite some other dependency upgrades, it's very hard to figure out where it goes wrong. We actually had 32 instances crashing and reproduced it in another environment pretty easily. After a couple of hours the number of open sockets didn't change.
The application uses webflux, so netty. To see if it was about netty I downgraded Spring Boot to 2.2.7 and only updated all netty dependencies to 4.1.50. With that configuration it worked fine, the amount of sockets stayed around 30.000.
I can't reproduce this on my Mac, but with some load easily on PCF on Linux. So I think it's related to the OS.
Some stack traces: