1
Answer

WebServer CPU usage % High - Windows Server 2012 - IIS 8.0

Nagaraj S

Nagaraj S

9y
388
1
Hi Members,
 
I have hosted a webapplication in Windows Server 2012  with IIS 8.0.  
  • The problem is CPU Usage always above 90% (Even when no request was received/served) . IIS Worker Process consumes more memory (85%)
  • I am 100% sure there is no issue with the application, since it had already worked fine with IIS 7.5
  • I made some changes as per the instruction given in the link. However it helped to reduce the CPU utlilization only up to 10%. 
 If anyone had come across the same issue, please give some solution,
 
Answers (1)
0
Vikram N
NA 66 14.7k 11y
thank u Sanjeeb...Lemme try it out...:)
0
Sanjeeb Lenka
NA 22.1k 1.3m 11y
check this code:

public int SaveEmp(Emp objEmp)
{
using (SqlConnection con = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True"))
{
 string query = "Emplyentry";  //stored procedure name
using (SqlCommand cmd = new SqlCommand(query , con))
{
cmd.Parameters.AddWithValue("@EmpName", objEmp.EmpName);
cmd.Parameters.AddWithValue("@EmpSal", objEmp.EmpSal);
con.Open();
int a = cmd.ExecuteNonQuery();
con.Close();
return a;
}

}
}
0
Vikram N
NA 66 14.7k 11y
Thanx a lot for ur kind reply Sanjeeb,That linkhelped me a lot...
But in dat example, database tables are used... But i need stored procedures usage... kindly help:)