Skip to content

Fix: failing socket connections in docker#3134

Closed
mdaif wants to merge 1 commit intosanic-org:mainfrom
mdaif:issue-3128
Closed

Fix: failing socket connections in docker#3134
mdaif wants to merge 1 commit intosanic-org:mainfrom
mdaif:issue-3128

Conversation

@mdaif
Copy link

@mdaif mdaif commented Jan 29, 2026

Sanic's test client (sanic-testing) starts/stops a real server for each request.
In Docker/Linux, rapid restart can sometimes fail with:
OSError: [Errno 98] Address already in use
because the previous listener socket may not be fully released yet. Enabling SO_REUSEPORT improves reliability of repeated bind/listen cycles on the same host:port.
It’s a no-op on platforms without SO_REUSEPORT support.

Issue-3128

Sanic's test client (sanic-testing) starts/stops a real server
for each request.
In Docker/Linux, rapid restart can sometimes fail with:
 OSError: [Errno 98] Address already in use
because the previous listener socket may not be fully released yet.
Enabling SO_REUSEPORT improves reliability of repeated
bind/listen cycles on the same host:port.
It’s a no-op on platforms without SO_REUSEPORT support.

Issue-3128
@mdaif mdaif requested a review from a team as a code owner January 29, 2026 09:39
@mdaif mdaif closed this Jan 29, 2026
@mdaif mdaif deleted the issue-3128 branch January 29, 2026 09:55
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