frosty1
asked on
"system lacked sufficient buffer space" on ashx handler
I have the following handler "myHandler,ashx"
This is hit by a windows schedule every 30 minutes. I set this up yesterdays. But over night at some stage it failed and bought down my entire website. Here is the error on my website
"An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full"
I've recycled the app pool and we are back running. But i'm wondering what are best pre-cautions i can take to stop this from occuring.
See attached code, it's not all of it but will give you an idea of what i'm doing.
This is hit by a windows schedule every 30 minutes. I set this up yesterdays. But over night at some stage it failed and bought down my entire website. Here is the error on my website
"An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full"
I've recycled the app pool and we are back running. But i'm wondering what are best pre-cautions i can take to stop this from occuring.
See attached code, it's not all of it but will give you an idea of what i'm doing.
public static bool Import()
{
DownloadXml();
return true;
}
private static void DownloadXml()
{
string path = HttpContext.Current.Server.MapPath(ConfigHelper.GetValue("FestivalSystemsXML"));
string url = ConfigHelper.GetValue("FestivalSystemsUrl");
WebClient client = new WebClient();
using (client)
{
client.DownloadFile(@url, @path);
}
// create _festivalsystemsArtist
_festivalsystemsArtist = ReadXML();
string thursdayPath = EventContentPath("Thursday");
CreateContentFiles(thursdayPath, Thursday, Thursday.AddHours(28));
string fridayPath = EventContentPath("Friday");
CreateContentFiles(fridayPath, Friday, Friday.AddHours(28));
string saturdayPath = EventContentPath("Saturday");
CreateContentFiles(saturdayPath, Saturday, Saturday.AddHours(28));
// Log Import
//LogWriter.FestivalSystemLogs("");
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.