Skip to content

clean resources (sockets/files)#5335

Open
ajozwik wants to merge 1 commit into
softwaremill:masterfrom
ajozwik:clean-resources
Open

clean resources (sockets/files)#5335
ajozwik wants to merge 1 commit into
softwaremill:masterfrom
ajozwik:clean-resources

Conversation

@ajozwik

@ajozwik ajozwik commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

As a result of investigating the unstable tests, the following issues were discovered:

  • After tests on linux the some sockets are waiting for close(even 10 minutes after run):

netstat -nap | grep tcp | grep ps ax | grep sbt | grep java | awk '{print $1}'
tcp6      32      0 127.0.0.1:36046         127.0.0.1:39005         CLOSE_WAIT  28290/java
tcp6       0      0 127.0.0.1:52832         127.0.0.1:41039         CLOSE_WAIT  28290/java
tcp6       0      0 127.0.0.1:37852         127.0.0.1:33087         CLOSE_WAIT  28290/java

Tested on ubuntu 25 and slackware 15.

But it failed unpredictably - so solution was removed from this PR

After adding ServerWebSocketTests.scala waitForMessage the problem disappeared.

  • For other if StreamMaxLengthExceededException/EntityStreamSizeException (or related) is thrown the created file was not deleted. It is risky - this poses a risk of a DDOS attack (disk full).

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

Successfully merging this pull request may close these issues.

1 participant