Skip to content

“An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full” after long run when server down #13102

@luchunminglu

Description

@luchunminglu

os: win server 2012
grpc version:1.6.1
.net framework:4.5

I run the following code for about two days . In this test, i doesn't start the server, after two days, every application on the machine can't establish outgoing tcp connect.
every time you want to build a new outgoing socket, a errors like this throwed.
“An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full”
if we close the grpc client, other application can establish new tcp connect.

and there may have memory leak . because my server and client need about 10mb more every day.
issues #13088 is about memory leak.

while (true)
           {
               Channel channel = null;
               try
               {
                   channel = new Channel("192.168.163.14:50051", ChannelCredentials.Insecure);
                   var client = new Greeter.GreeterClient(channel);
                   //since the server doesn't start, this will throw exception
                   var reply = client.SayHello(new HelloRequest());
                   Console.WriteLine("Greeting: " + reply.Message);
               }
               catch (Exception ex)
               {
                   Console.WriteLine(ex);
               }
               finally
               {
                   if(channel !=null)
                       channel.ShutdownAsync().Wait();
               }

               //the smaller sleep time,the quicker problem occurs
               Thread.Sleep(15000);
           }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions