-2

My asp.net application crashes sometimes in live server while we are working on it. All users are facing [Exceptions]yellow error screen.And Throws dozens of exception in exception log.

[Get] find 0 Table rows

This exception occurs on randomly not on specific location or specific click. But when I restart my application on IIS the application working fine. but again some hours same problem appears.

When I try to Re-login Than application don't find my credentials. but after restart IIS. I successfully login in to application with same credentials.

Summary: not find the specific reason of crashes. Working fine when i restart IIS.

  1. drop down list are not find data from datasource
  2. Grid table find 0 rows when access to table.

when same grid and drop down list is access after IIS restart it has data.

Note: its feels that we lost connection from database. but actually it has connection but find no data in it

Ali Imran
  • 646
  • 1
  • 9
  • 26
  • What exactly is the exception message/stack trace? – Steve Oct 08 '18 at 09:37
  • 1
    Steve its give dozens of exceptions. but i share it with you some exceptions innerException====>System.IndexOutOfRangeException: Cannot find table 0. – Ali Imran Oct 08 '18 at 09:52
  • Define "while we are working on it". What exactly do you do when it crashes? – CodeCaster Oct 08 '18 at 10:43
  • This exception occurs on randomly not on specific location or specific click. – Ali Imran Oct 08 '18 at 10:46
  • Why do you say _"while we are working on it"_? This implies development being done on a live server. Or do you simply mean _"while users are using the site"_? – CodeCaster Oct 08 '18 at 10:52
  • while we using the application. mean my user use application, – Ali Imran Oct 08 '18 at 10:54
  • CRUD operations – Ali Imran Oct 08 '18 at 10:55
  • With exception call stacks and the source code, your top priority is to understand them and fix the code. If you are not capable of doing so, I suggest you open a support case via http://support.microsoft.com to consult Microsoft. It would be hard for SO to help, as no one here has access to your code base. – Lex Li Oct 08 '18 at 16:54

2 Answers2

0

Try to catch exception and check server response time

0

After a lot of search i find the depth of the problem and the problem is memory leak.

Memory leaks in .NET applications have always been a programmer’s nightmare. Memory leaks is the biggest problems when it comes to production servers. Productions servers normally need to run with the least down time. Memory leaks grow slowly and after sometime they bring down the server by consuming huge chunks of memory. Most of the time people reboot the system, make it work temporarily, and send a sorry note to the customer for the downtime

some use full links are: link 1 link 2

The proper solution of the problem is very time consuming and need a skill full person. Solution for temporary basis is when you application is down you need to reset ISS programatically.

Process.Start(@"C:\WINDOWS\system32\iisreset.exe", "/noforce");

or

Process p = new Process(); p.StartInfo = new ProcessStartInfo("iisreset.exe"); p.Start();

I know this is not a good solution but this can put the pressure off from your head.

For proper solution check this link

Ali Imran
  • 646
  • 1
  • 9
  • 26