title: Why application pool is recycling while reading large excel file on asp.net
body: <p>I have an asp.net web application. I m reading and processing excel files on it.</p>
  
  <p>Below code shows that how do i read excel files.</p>
  
  <pre><code>            string strComand;
              if (strSheetName.IndexOf("|", StringComparison.Ordinal) &gt; 0)
              {
                  _sheetName = strSheetName.Substring(0, strSheetName.IndexOf("|", StringComparison.Ordinal));
                  _range = strSheetName.Substring(strSheetName.IndexOf("|", StringComparison.Ordinal) + 1);
                  strComand = "select * from [" + _sheetName + "$" + _range + "]";
              }
              else
              {
                  strComand = "select * from [" + strSheetName + "]";
              }
  
              _daAdapter = new OleDbDataAdapter(strComand, _cn); 
              DataTable dt = new DataTable(strSheetName); 
              _daAdapter.FillSchema(dt, SchemaType.Source); 
              GC.Collect();
              GC.WaitForPendingFinalizers();
  
              _daAdapter.Fill(dt);  // there is a problem on this line
              _cn.Close(); 
              retInfo.Data = dt;  
  
              return retInfo;
  </code></pre>
  
  <p>If i read small size excels then there is no problem. But when i tried to read large excel files then my application pool is recycling.</p>
  
  <p>What should i do.</p>