I have developed an images and video blogging website using asp.net 4.0 & sql server 2008
. Everything was going well, but now I am facing Error 503 when a large number of users visit concurrently. My website is on a Shared Hosting (GoDaddy).
What I have tried till now is:
1.using using
Statements (i.e my connection disconnects after each query):
using (SqlConnection conn = new SqlConnection(constrg))
{
DataTable dt = new DataTable();
using (SqlCommand cmd = new SqlCommand(cmdText, conn))
{
cmd.CommandType = Type;
if (prms != null)
{
foreach (SqlParameter p in prms)
{
cmd.Parameters.Add(p);
}
}
SqlDataAdapter adpt = new SqlDataAdapter(cmd);
adpt.Fill(dt);
return dt;
}
}
2.set NoCount
for sql procedures
But still I am facing the same problem. Now my questions are:
How can I get rid of this problem ?
Can it be solved by changing my hosting?
Is it something that I am missing in my code ?
Should i implement Caching? & How?