Showing results for 
Show  only  | Search instead for 
Did you mean: 

I/O in System.Net.UnsafeNclNativeMethods+OSSOCK recv method


I have a costumer who face response time problems in method  "System.Net.UnsafeNclNativeMethods+OSSOCK recv()" it makes I/O normally.

When I search  it from google. I get the issue may cause by the configuration of IIS config machine.config

 Below is the what I have found from google ;

I would be please if you make any comments on this problem.


Costumer face this problem very often and  I found this method that cause response time problem almost all the time.

Here is the some session example for this case

recv methods cause slow response time.dts







recv() methods are signals in a PurePath of the application waiting for something else (like a remote web service).  You can see what it is waiting for by following the tree from recv() in Method Hotspots (open it in your session or drill-down from any PurePath).  What is shown is a reverse stack tree, branching where the paths of execution differ and ranked by highest time spent in recv() per path.  If I look at one of the higher contributing paths and trace down to where we see customer code I see the following, does this give better context to the customer?

I do not see the image. Can you share it again ?


What I guess is this issue may be resolved with some configurations changes on IIS. Because I see this behaviour in different aplications. It may not

be related to costumer code related.

Can you check the URLthat I shared in my previous message ?



From the URL you shared, there is a way to test if you are experiencing the same issue:

I'm measuring the # of concurrent connections by running TCPView on the server to see how many backend connections are made by the IIS worker processes.

Is this issue only under load?  Is the backend service that this is connecting to responsive otherwise?  Do you have a way to test?

Rick B


This problem occurs under the load only.I could not measure  concurent connection measure until now. I will setup windows performance monitor plugin and get this measure.

My main concern is ;

I see a method spends most of the time in I/O not sync, not cpu, not suspensition and and this method does not read something from file, not make sql commands. Network time also is not included in this I/O. I see I/O time spent in the same server. Machine host and process health is ok when the issue occurs. So what is the reason of this I/O ? I do not see any reason for it. I think it may be related to some configuration issue on IIS/ASP:NET. Or what dou you think the reason of this I/O time might be ? I want to give an actionable information to costumer.I will offer costumer to open a case to microsoft for the issue. 

I would be pelased if you make comments about my ideas.



Dynatrace Leader
Dynatrace Leader

If you have a connection pool issue where you do not have enough connections available you will also see this time in I/O because most of the connection handling is done in native code. I would double check all configuration options for pools, pool sizes. Besides connection pools also check thread pools. And - also check it on both sides (the caller and the service). We recently had a simliar issue in our internal systems. We use IIS as a web server forwarding requests to Tomcat. There are connection pool configurations on both IIS as well as Tomcat. We forgot to adjust both sides - thats why we still ran with a default of 10 connections causing high response times under load but just showing up as I/O