IIS Webserver freezes after multiple tabs from website were opened

582 views Asked by At

My IIS webserver freezes, when i open multiple tabs on firefox/chrome/etc. Im not sure, what it is. I think i have a problem with my SQL Server, though i`m using javascript to get live-data directly from the database. My Javascript fills in a span a value. The value is loaded from an external asp.net file. The asp file loads the vaule from my sql database.

The freeze looks like this: When one tab is opened i can use the page as i want. I can choose data from a table, open the data and read a life-value 8Or better, multiple live values).

When i open another tab, the page starts loading very long. sometimes the page can be loaded, but after a few moments the other page crashes with the live data and after that nothing can be loaded again. then i need to restart the complete iis service.

I checked every sql query, to open the connection, use the reader, close the reader and close the connection again (Check code).

I programmed a work-around, which is not working anymore, i dont know why. it restarts via batch every 5 seconds the website (not the service, though its taking to long and the pages stop connecting).

I use now jquery for live-data, though pure js was not working correctly.

I reinstalled the iis service, with all components.

I reconfigured the website which is running on my IIS.

This is a sample request-answer from the asp file, which will be loaded from the js for live-data

//Wir benötigen die Artikelnummer
if (Request.QueryString["artikelnr"] != null)
 {
  DBMaster dbm = new DBMaster();
  string return_text = "X2";

  string query = "SELECT * FROM artikel WHERE artikelnr LIKE '" + Request.QueryString["artikelnr"].ToString() + "' AND beendet LIKE '0'";

try
 {
  SqlDataReader artikel = dbm.get_data(query);
  //Zähle die Zahlen hoch für Sollmenge
  while (artikel.Read())
   {
    sollmenge += Int32.Parse(artikel["sollmenge"].ToString());
   }
  return_text = sollmenge.ToString() + " St.";
  artikel.Close();
  //Datenbankverbindung schließen
  dbm.close_connect();
  }
  catch (Exception ex)
  {
   //Wir geben eine Leere antwort, falls wir keine Daten gefunden haben.
   return_text = "Failed: X1";
  }
  lit_api_answer.Text = return_text;
  }

This is the js for live data

<script>
 //Globale Funktion ohne angabe von IDs oder Stationsnummern
 function get_global_data(type, gdata) { $(gdata).load('api_call.aspx?type=' + type, function () { }); }
 setInterval(function () {
 get_global_data('get_nothalt', '#gnothalt')
 }, 2000);
 </script>

the span, which will be filled with the live-data

<span id="gnothalt">
</span>

I hope, that its only the code. but if you like, you can give other information, like - the OS is a modified version from beckhoff. I cant see the service running.

0

There are 0 answers