1

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

Jyoti
  • 19
  • 3

1 Answers1

0

In web.config update httpRuntime executionTimeout value:

<configuration>
    <system.web>
        <httpRuntime executionTimeout="300" />
    </system.web>
</configuration>

executionTimeout: Specifies the maximum number of seconds that a request is allowed to execute before being automatically shut down by ASP.NET.The default is 110 seconds.

Kapil Khandelwal
  • 15,958
  • 2
  • 45
  • 52
  • Modify the comment. Delete the comment. 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. – Jyoti Jul 13 '17 at 05:40
  • var kernel = new StandardKernel(); kernel.Load(Assembly.GetExecutingAssembly()); var objRepo = kernel.Get(); 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. – Jyoti Jul 13 '17 at 05:41