Skip to content

Socket limit reached - server doesn't recover #277

Open
@dwlodarz

Description

@dwlodarz

I have implemented a router and a client in .net just to see how it works in general. Then I have deployed it to S2 AppService in Azure. The problem that I experience is that once the TCP connection limit is reached (~4k) and I close all the clients the router becomes unusable. I cannot connect any new clients. It seems that the connections are not being disposed.

This is the exception I'm getting:
System.AggregateException: One or more errors occurred. (Unable to connect to the remote server) ---> System.Net.WebSockets.WebSocketException: Unable to connect to the remote server ---> System.Net.Http.HttpRequestException: Nie mozna przeprowadzic operacji na gniezdzie, poniewaz w systemie brakuje miejsca na bufor lub poniewaz zostala zapelniona kolejka ---> System.Net.Sockets.SocketException: Nie mozna przeprowadzic operacji na gniezdzie, poniewaz w systemie brakuje miejsca na bufor lub poniewaz zostala zapelniona kolejka
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)

which means pretty much this:
" An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full"

Could you pls advise?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions