URGENT. Timeout Expired. Error.

Last post 09-25-2008 4:17 AM by pak766. 43 replies.

Sort Posts:

  • URGENT. Timeout Expired. Error.

    09-16-2004, 2:04 AM
    • Member
      375 point Member
    • euroiranian
    • Member since 02-15-2004, 12:09 PM
    • Posts 75
    Hi all,

    I've a articles section with 4500 articles. When I try to read the complete article, I get the next error:

    Server Error in '/International' Application.
    --------------------------------------------------------------------------------

    Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:


    [SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]
    System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
    System.Data.SqlClient.SqlCommand.ExecuteReader() +41
    ASPNET.StarterKit.Communities.CommentUtility.GetComments(String username, Int32 contentPageID, Int32 orderBy) +369
    ASPNET.StarterKit.Communities.Comments.BindComments() +76
    ASPNET.StarterKit.Communities.Comments.OnLoad(EventArgs e) +404
    System.Web.UI.Control.LoadRecursive() +35
    System.Web.UI.Control.LoadRecursive() +98
    System.Web.UI.Control.AddedControl(Control control, Int32 index) +306
    System.Web.UI.ControlCollection.Add(Control child) +153
    ASPNET.StarterKit.Communities.SkinnedCommunityControl.CreateChildControls() +32
    System.Web.UI.Control.EnsureChildControls() +100
    System.Web.UI.Control.PreRenderRecursiveInternal() +38
    System.Web.UI.Control.PreRenderRecursiveInternal() +125
    System.Web.UI.Control.PreRenderRecursiveInternal() +125
    System.Web.UI.Control.PreRenderRecursiveInternal() +125
    System.Web.UI.Control.PreRenderRecursiveInternal() +125
    System.Web.UI.Page.ProcessRequestMain() +1476




    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573


    My Web.Config file is:

    <configuration>
    <configSections>
    <sectionGroup name="communityStarterKit">
    <section name="Isp" type="ASPNET.StarterKit.Communities.CommunitiesSectionHandler,ASPNET.StarterKit.Communities" />
    <section name="pagePaths" type="ASPNET.StarterKit.Communities.CommunitiesSectionHandler,ASPNET.StarterKit.Communities" />
    <section name="database" type="ASPNET.StarterKit.Communities.CommunitiesSectionHandler,ASPNET.StarterKit.Communities" />
    <section name="services" type="ASPNET.StarterKit.Communities.CommunitiesSectionHandler,ASPNET.StarterKit.Communities" />
    </sectionGroup>
    </configSections>

    <communityStarterKit>
    <Isp>
    <add key="IspUsername" value="Usr" />
    <add key="IspPassword" value="Psw" />
    <!-- <add key="TimeZoneAbbreviation" value="EST" /> -->
    <!-- <add key="GmtTimeOffset" value="-5" /> -->
    </Isp>

    <pagePaths>
    <add key="basePage" value="/communityDefault.aspx" />
    <add key="baseService" value="/communityService.asmx" />
    </pagePaths>

    <database>

    <add key="connectionString" value="server=localhost;uid=sa;pwd=secret;database=MyDataBase" />
    </database>

    <services>
    <add key="enableServiceTimer" value="true" />
    </services>

    </communityStarterKit>


    <system.web>
    <compilation debug="false" />
    <customErrors mode="Off"/>
    <httpModules>
    <add name="CommunitiesModule" type="ASPNET.StarterKit.Communities.CommunitiesModule,ASPNET.StarterKit.Communities" />
    </httpModules>

    <authentication mode="Forms">
    <forms loginUrl="Users_Login.aspx" timeout="60" />
    </authentication>

    <pages validateRequest="false" />


    <!-- We need to make sure this is set high enough so that the user doesn't get a timeout error while uploading. -->
    <!-- The largest file size that ASP.NET will allow for uploads. -->
    <httpRuntime maxRequestLength="1000" executionTimeout="180" />


    <httpHandlers>
    <add verb="*" path="*.jpg" type="ASPNET.StarterKit.Communities.ImageHandler, ASPNET.StarterKit.Communities" />
    <add verb="*" path="*.jpeg" type="ASPNET.StarterKit.Communities.ImageHandler, ASPNET.StarterKit.Communities" />
    <add verb="*" path="*.gif" type="ASPNET.StarterKit.Communities.ImageHandler, ASPNET.StarterKit.Communities" />
    </httpHandlers>

    <webServices>
    <protocols>
    <add name="HttpGet"/>
    </protocols>
    </webServices>
    </system.web>
    </configuration>





    I hope some help. Thanks you all in advance.
  • Re: URGENT. Timeout Expired. Error.

    09-17-2004, 4:50 AM
    • Participant
      1,925 point Participant
    • para7
    • Member since 06-05-2003, 5:55 AM
    • Denmark
    • Posts 385
    I'm not at .net pro, but I know some tricks. Have had many unexpected spooky errors in the last year with gcn.
    Timeout use to come when a page takes too long to load because of some error.
    You say "When I try to read the complete article, I get the next error". So I presume you are able to view a list of articles, but when you open ANY article something stucks.
    Have you tried to create a new article and see if that loads? What about on localhost, same thing wrong here?
    If not or anyway. Try to upload (overwrite) Global.asax from the root to restart the gcn application.
    4500 articles is a lot. What's the size of your database? Can you create an article in another new created community?

    Hope this helps :)
    Jørgen A.J.

  • Re: URGENT. Timeout Expired. Error.

    09-17-2004, 9:49 AM
    • Member
      375 point Member
    • euroiranian
    • Member since 02-15-2004, 12:09 PM
    • Posts 75
    Hi Para,

    At least you know something, thanks for your help.

    Yes, you're right, I can see the list of articles, and when I try to open any of the articles in that community (I have four) then I get the error. The problem in the whole community, not only in the section holding the 4500 articles, also in other sections inside this community, one of them with only two articles. But not in the other communities with only a few articles.

    About create new articles, or localhost. I've tried all, but not solution.

    About overwrite the gobal.asax, I don't know how to do that. I presume that I must delete the file and create it again from zero. Am I right?

    The size of my Db is 200Mb allocated (85Mb in use) and the transaction log space is 275 allocated (125 used)

    Hope you can guide me a little bit more, thanks. Tomas.
  • Re: URGENT. Timeout Expired. Error.

    09-17-2004, 11:02 AM
    • Member
      375 point Member
    • euroiranian
    • Member since 02-15-2004, 12:09 PM
    • Posts 75

    Edited by Haidar_Bilal - Please place your code within the < code > and < /code > tag. Thank you.
    Hi again,

    I've chacked my Global.asax file and it's too empty, it only have a line of code, there is also other Global files.

    The global.asax is as follows:

    <%@ Application Codebehind="Global.asax.cs" Inherits="ASPNET.StarterKit.Communities.Global" %>




    My Global.asax.cs is:

    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Web;
    using System.Web.SessionState;
    using ASPNET.StarterKit.Communities.Services;

    namespace ASPNET.StarterKit.Communities
    {

    //*********************************************************************
    //
    // Global Class
    //
    // The Global.asax is used to setup the timer for service subscriptions.
    //
    //*********************************************************************
    public class Global : System.Web.HttpApplication
    {
    public Global()
    {
    InitializeComponent();
    }



    //*********************************************************************
    //
    // CreateTimers Method
    //
    // The timer fires every 15 minutes (60000 * 15).
    //
    //*********************************************************************
    private void CreateTimers() {

    if (CommunityGlobals.EnableServiceTimer) {
    System.Timers.Timer WebServiceTimer = new System.Timers.Timer();
    WebServiceTimer.Enabled = true;
    WebServiceTimer.Interval = (60000 * 15);
    WebServiceTimer.Elapsed += new System.Timers.ElapsedEventHandler(WebServiceTimer_Elapsed);
    }
    }




    //*********************************************************************
    //
    // WebServiceTimer_Elapsed Method
    //
    // Every 15 minutes, check for new content from remote communities.
    //
    //*********************************************************************
    protected void WebServiceTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) {
    ServiceUtility.GetRemoteContent();
    }





    //*********************************************************************
    //
    // Application_Start Method
    //
    // Create two timers for sending emails and polling Web services.
    //
    //*********************************************************************
    protected void Application_Start(Object sender, EventArgs e)
    {
    CreateTimers();
    }

    protected void Session_Start(Object sender, EventArgs e)
    {

    }

    protected void Application_BeginRequest(Object sender, EventArgs e)
    {

    }

    protected void Application_EndRequest(Object sender, EventArgs e)
    {

    }

    protected void Application_AuthenticateRequest(Object sender, EventArgs e)
    {

    }

    protected void Application_Error(Object sender, EventArgs e)
    {

    }

    protected void Session_End(Object sender, EventArgs e)
    {

    }

    protected void Application_End(Object sender, EventArgs e)
    {

    }

    #region Web Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
    }
    #endregion
    }
    }



    Also I have a Global.asax.resx file:

    <?xml version="1.0" encoding="utf-8" ?>
    <root>
    <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:element name="root" msdata:IsDataSet="true">
    <xsd:complexType>
    <xsd:choice maxOccurs="unbounded">
    <xsd:element name="data">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
    <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
    </xsd:sequence>
    <xsd:attribute name="name" type="xsd:string" />
    <xsd:attribute name="type" type="xsd:string" />
    <xsd:attribute name="mimetype" type="xsd:string" />
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="resheader">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
    </xsd:sequence>
    <xsd:attribute name="name" type="xsd:string" use="required" />
    </xsd:complexType>
    </xsd:element>
    </xsd:choice>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    <resheader name="ResMimeType">
    <value>text/microsoft-resx</value>
    </resheader>
    <resheader name="Version">
    <value>1.0.0.0</value>
    </resheader>
    <resheader name="Reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    </resheader>
    <resheader name="Writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    </resheader>
    </root>

    I don't know what to do. I'm desperate with this problem, please some help. Tomas.
  • Re: URGENT. Timeout Expired. Error.

    09-17-2004, 11:19 AM
    • Participant
      1,925 point Participant
    • para7
    • Member since 06-05-2003, 5:55 AM
    • Denmark
    • Posts 385
    Hi again Tomas

    About overwrite the gobal.asax, just upload it from the local gcn to overwride the one on remote. This helped me many times when things f..... up. So try that as the first thing.

    Second you could try to run the local gcn again to do some tests.
    Don't understand from what your'e telling if you have the same problem here with this community or you don't have an recently database here restored from the one remote?
    Anyway you could try and set the local gcn to connect to the remote (Web.config connection string) and see if it's the same problem.

    Try also to compile/debug the local gcn. Then your'e sure it's the problem in the remote database and not some file or compilation.
    Last thing I could think of is trying to create a new Articles Section in the problem-community. Maybe that will work?

    Last of all maybe create a new community and copy-paste from the old. But 4500 articles is a LOT. I have myself submitted sections as a Web service into other communities, and when I edit an article it becomes this communitie's "property", and then "cut the connection" again.

    An idea: Maybe it is just one article of the 4500 that messes things up.
    Jørgen A.J.

  • Re: URGENT. Timeout Expired. Error.

    09-17-2004, 11:26 AM
    • Participant
      1,925 point Participant
    • para7
    • Member since 06-05-2003, 5:55 AM
    • Denmark
    • Posts 385
    Also try and upload a freshly compiled ASPNET.StarterKit.Communities.dll, ofcause I would download the one remote to have a backup. I have learned you cannot have a backup of the dll lying in the same folder, the bin folder.

    The gobal.asax has not much in it but it restarts the gcn. OK, it may be an idea to delete it remotely and refresh the community in the browser before uploading it from local.
    Jørgen A.J.

  • Re: URGENT. Timeout Expired. Error.

    09-17-2004, 12:52 PM
    • Member
      375 point Member
    • euroiranian
    • Member since 02-15-2004, 12:09 PM
    • Posts 75
    Hi Para,

    I Updated the Global.asax and the ASPNET.StarterKit.Communities.dll, but nothing changes. The problem persists.

    In the other hand, I exported the Db to other machine and tried from there, but doesn't work for this community too. Simplifying, no matter what SQL server I use, the problem remain as is.

    My server is a machine running Win 2003 server with SQL 2000 SP3, DNS, IIS 6.0 with .NET Framework 1.1 ver. 1927. The problematic community use a subdomain URL (int.mydomain.com/application). When I try to open other articles in other communities (xxx.mydomain.com/application) it works fine, but when I try to open any article in this community (in this section or in any other article's section inside this community) doesn't work.

    About your last idea, the 4500 articles consist in a Title with less than 142 characteres, a Intro Text with "Terminology & Lexicon + the Title" and a Extended text with the meaning of the Title inside HTML tags. Bellow an example:


    Title:
    UNESCO Convention on the Means of Prohibiting and Preventing the Illicit Import, Export and Transfer of Ownership of Cultural Property of 1970

    Intro Text:
    Terminology & Lexicon: UNESCO Convention on the Means of Prohibiting and Preventing the Illicit Import, Export and Transfer of Ownership of Cultural Property of 1970

    Extended Text:
    <table border="1" width="100%" id="table1" style="border-width: 0px">
    <tr>
    <td style="border-style: none; border-width: medium" colspan="2">UNESCO Convention on the Means of Prohibiting and Preventing the Illicit Import, Export and Transfer of Ownership of Cultural Property of 1970:</td>
    </tr>
    <tr>
    <td style="border-style: none; border-width: medium" width="8%">&nbsp;</td>
    <td style="border-style: none; border-width: medium" width="90%" bgcolor="#DDDDFF">
    In 1970 the United Nations organization UNESCO took on the challenge to counter the pilfering of architectural complexes, destruction of ancient sites, and international trade in stolen cultural properties. UNESCO issued a "convention" (an international agreement to which a number of nations are contractual parties) called the "UNESCO Convention on the Means of Prohibiting and Preventing the Illicit Import, Export and Transfer of Ownership of Cultural Property." Its concern: "the measures to be adopted to forbid and prevent the importation and the transfer of the illicit property of cultural goods." . Also see antiquity and museum.</td>
    </tr>
    </table>




    I don't think that the messes comes from one of the articles, I think that the problem really comes from the timeout period asigned by the Db or the .NET Framework. Probably the needed time to proccess this amount of data must be a little bit higher than the standard (if I don't missunderstood it is 30 seconds). Now maybe you know, or someone else, how to increase the timeout period ?. About this point, notice that my server is a poor celeron 466 with only 160 MB RAM.


    Also note that I already added the line in my Web.Config file
    <httpRuntime maxRequestLength="1000" executionTimeout="180" />
    but nothing happens.

    I hope with this information we can find a solution. Thanks.

    Tomas
  • Re: URGENT. Timeout Expired. Error.

    09-18-2004, 4:22 AM
    • Participant
      1,925 point Participant
    • para7
    • Member since 06-05-2003, 5:55 AM
    • Denmark
    • Posts 385
    Hi again

    It is a lot of articles, but they are small. I think too, that it is the thousands of articles that is hard to handle and it times out. The same thing has happened at my pretty slow SQL server at webhost4life.com from over this side of the Atlantic.

    But I will still say; you MUST try running the whole thing including database on your local machine. If I do that everything is as quick as the blink of an eye - on remote I sometimes have to wait and things time out - that's MY only real problem with the gcn now.
    On the remote side, if no problem on local, I would make a backup of the db. Then try and delete all articles except a few in the problem-community and see if that "solves" the problem. Then maybe divide articles by putting some or all of them into another community and fetch them from there.

    Else let's hope for some of the "big shots" like Star Pilot or Redd to look by one of theese days. This forum seems quite abandoned theese months, hope people return again.

    BTW: How and when did the problem start? Did it happen sudden or gradual. If it is because of too many posts it might have gotten worse and worse until suddently the "limit" was reached.
    Jørgen A.J.

  • Re: URGENT. Timeout Expired. Error.

    09-18-2004, 6:49 AM
    • Member
      375 point Member
    • euroiranian
    • Member since 02-15-2004, 12:09 PM
    • Posts 75
    Hi Para,

    Thanks a lot for your cooperation in this matter.

    I monitorized my server and I noticed that the CPU works at 100% when I request one of the articles of the problematic community. Maybe the problem cames from my machine, and not from the amount of data. I hope so... because this articles are a very small part of my site. I want insert up to 20.000 registries in my database between articles, books & disscuses + up to 10.000 pics, only to begin.
    Currently I've sent the database to my ISP to see what happens working with several BIG machines.

    About your recomendation to try localhost, I tried it, but it can be tested right until I run subdomains in the IIS and I'm not sure how to do that. One thing more, when I try to operate from the machine where is hosted the application & database (by mydomain.com, not localhost) I have the same problem.

    Anyway, I will wait until my ISP updated the db in their server to see what happens and I will inform you.

    Thanks Para, I hope too that the "big shots" came back to these forums soon, then everything will be easier.... and pleasant.

    Tomas.
  • Re: URGENT. Timeout Expired. Error.

    09-18-2004, 10:00 AM
    • Member
      375 point Member
    • euroiranian
    • Member since 02-15-2004, 12:09 PM
    • Posts 75
    OH sorry, I forgot answer your last question!!!

    The problem came sudden when I updated the section in question. I inserted the articles from other machine in the server (both in the LAN) using a Macro and the "Articles_AddArticle.aspx" form. Everything worked right until the amount of articles grow up to +/-2000, then this section stops showing the articles in full, but I'm allowed to add new articles, edit any one of them, delete, move, change the order... etc, only I cannot see any article in full (Read More...), or in other words, to open the pages "http://int.mydomain.com/application/sectionName/xxxxx.aspx"

    Note that the problem is not only for this section, any section inside this community is having the same problem, but only in this community. The other communities are working right (note that the other communities are not empty, only a few articles).
  • Re: URGENT. Timeout Expired. Error.

    09-19-2004, 4:30 AM
    • Member
      375 point Member
    • euroiranian
    • Member since 02-15-2004, 12:09 PM
    • Posts 75
    Hi Para,

    My ISP updated the DB in their SQL server and nothing changes, the problem remains...

    You can check it out in: http://int.artshoo.com/International/Lexicon/10152.aspx

    Please some help, I'm desperate.



  • Re: URGENT. Timeout Expired. Error.

    09-19-2004, 6:43 AM
    • Participant
      1,925 point Participant
    • para7
    • Member since 06-05-2003, 5:55 AM
    • Denmark
    • Posts 385
    Hi again euroiranian

    First you don't need to be able to run subdomains to run a certain community on localhost. Just go to ispAdmin, choose the problem community and set a * in both Community Domain and Community Subdomain. I think if you try it on localhost you'll know a lot more.

    Second I navigated some in your community. I found it slow to very slow in general. Does the CPU work at a high percentage in general then maybe that server has to many customers or is outdated. For sure it seemed not really well. My gcn (look at 7d.dk or tni.tni.dk for example) is pretty slow at times, but this is heavy. It timed out pretty soon with an article. My pages have loaded if it were hanging for a longer time than that.

    Third try to submit a post with reference to this post in the Community Starter Kit forum. http://asp.net/Forums/ShowForum.aspx?tabindex=1&ForumID=88
    I think you know it's basically the same architecture, same articles section. So maybe just call it a cs version of the Community Starter Kit.

    BTW i can see redd has been there friday ;)
    Jørgen A.J.

  • Re: URGENT. Timeout Expired. Error.

    09-19-2004, 10:30 AM
    • Member
      375 point Member
    • euroiranian
    • Member since 02-15-2004, 12:09 PM
    • Posts 75
    Hi para,

    Thanks for your recommendations. Currently we are doing some changes in the db, but immediately after I will try with localhost as proposed.

    About the navigation speed, I noticed ity too, but I don't know the reason. Maybe because we recently updated the db and restarted the IIS?

    I have took a look on you websites and both are working really soon compared by mines.

    Regarding to post submission to CSK forum, I already did it.
    Nobody alive in there, post:
    http://asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=693808

    submitted on: 09-16-2004 02:05 AM but still 0 replies. Anyway, I will submit other now. Maybe this time I've better luck...

  • Re: URGENT. Timeout Expired. Error.

    09-19-2004, 1:50 PM
    • Member
      10 point Member
    • suprjack
    • Member since 09-05-2004, 10:52 AM
    • Posts 2
    From the error message you are receiving I think you should check the machine.config file.

    Check both the 'httpRuntime' and 'processModel' sections of the file.

    Both sections are responsible for configuring ASP.NET process model setting on an IIS web server.

    You maybe exceeding your executionTimeout or Timeout settings.

    This file in usually installed in the framework\version#\config directory (i.e. C:\WINNT\Microsoft.NET\Framework\v1.1.4322\CONFIG) and is well noted.

  • Re: URGENT. Timeout Expired. Error.

    09-19-2004, 4:25 PM
    • Member
      375 point Member
    • euroiranian
    • Member since 02-15-2004, 12:09 PM
    • Posts 75
    Hi,

    Thanks Suprjack.

    I've changed both section of the file to:



    <httpRuntime
    executionTimeout="9000"
    maxRequestLength="4096"
    useFullyQualifiedRedirectUrl="false"
    minFreeThreads="8"
    minLocalRequestFreeThreads="4"
    appRequestQueueLimit="100"
    enableVersionHeader="true" />

    <processModel
    enable="true"
    timeout="Infinite"
    idleTimeout="Infinite"
    shutdownTimeout="Infinite"
    requestLimit="Infinite"
    requestQueueLimit="5000"
    restartQueueLimit="10"
    memoryLimit="60"
    webGarden="false"
    cpuMask="0xffffffff"
    userName="machine"
    password="AutoGenerate"
    logLevel="Errors"
    clientConnectedCheck="0:00:05"
    comAuthenticationLevel="Connect"
    comImpersonationLevel="Impersonate"
    responseDeadlockInterval="00:03:00"
    maxWorkerThreads="20"
    maxIoThreads="20" />



    and restarted de IIS after the changes, but nothing changed.

    Other idea?
Page 1 of 3 (44 items) 1 2 3 Next >