Click here to Skip to main content
15,877,051 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
When CPU Utilisation riches 70% to 80 % at that time when user call web service method for e.g like time 12.01.00 but it riches to database server after one minute like 12.02.00 and database server gives response in fraction of milliseconds for that request and we receive this error System.Web.HttpException (0x80004005): Request timed out in elmah .There is a time difference between receiving request at web service method and sending it to database. When CPU normal then everything works smoothly within fraction of seconds.I don't understand why this one min time difference occurring between received request at .net side and sending it to database. After reset iis every thing work normal .This happens only production server but not in development and UAT Server.
IIS version:-8.5 and sql 2012

What I have tried:

tried to find whenever we get performance issue first we check the database any heavy query is running or not.
Posted
Updated 5-Jul-17 2:03am

1 solution

Have you looked at the HttpException? There may be an inner exception and other information that may save us some guessing. I see by the error code that it's a timeout, but who knows.

If this does not help, try using the profiler in the SQL Server Management Studio.

Last, if it's really the web method calln that's delayed, try debugging into the service call and look when a breakpoint in the web method is reached. If that happens, the problem is outside your code and must be some network problem or a configuration problem. For example, it could be the IIS that is not properly set up.
 
Share this answer
 
v2
Comments
Member 13294248 6-Jul-17 1:49am    
is there is any tool to check that how many objects are creating in the application pool for that project
CodeWraith 6-Jul-17 4:07am    
Perhaps the Sysinternals Suite? You would have to run one of the tools on the server to monitor the IIS processes.

https://technet.microsoft.com/de-de/sysinternals/bb842062
Member 13294248 10-Jul-17 1:26am    
Thanks for reply. i got to know where was the issue in my project. we are used the DI pattern in my project but now we are commented the code and its working fine. Below is my sample code.

var kernel = new StandardKernel();
kernel.Load(Assembly.GetExecutingAssembly());
var objRepo = kernel.Get<irepository>();
Int64 Reponse = objRepo.WriteLogToDatabase(sInputJson, sCreatedBy, sAPIName, dtRequestDateTime, sPOSCode, sMobileNo, sDocNo, sDocPrefix, sVersion, Flag_Bulk, Bulk_count, Flag_Online);
return Reponse;

Can you please help us how to implement best way of DI. Because below line
kernel.Load(Assembly.GetExecutingAssembly()) its taking more space in IIS worker processor. If you provide the best way of DI implement it can help full in my project.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900