none
whay site application pool must be reset? RRS feed

  • Question

  • my site is on mvc4 and .net 4.5 and it is on a web farm (windows server 2008).
    i have another wcf service on a sub domain.
    i have a client windows application and it connect to that wcf server every 2minites and retrieve some data.

    these works fine but after 12hour my site application pool must be reset until my site and that wcf service can work again.

    i want to know what thing(s) make cause this case and why i must reset my application pool until my site can going to works again.

    i have no bug on wcf and my site and search on internet but found nothing.

    Thanks Motevallizadeh

    Monday, September 16, 2013 8:49 PM

Answers

  • Hi,

    Please try to refer to the reply post by @Rion Williams in: http://forums.asp.net/t/1936900.aspx?whay+site+application+pool+must+be+reset+ .

    Typically a Application Pool will need to be reset if any issues arise regarding memory, resources, time-outs or a variety of other issues. .NET usually handles this by adding automatic time-outs through the idleTimeout property, but occasionally it needs to be done manually.

    Ace presents a very good point that can be the reason that requires a connection to be occasionally reset (out of resources).

    Typically, you'll want to ensure that any instances that you are using a data-connection with (such as an SqlConnection or similar) are being closed and disposed of properly (to allow their resources to be used elsewhere within your applications).

    The easiest method to do this would be to use the using statement available in .NET, which typically looks something like the following : 

    //This will only define your connection within the scope of the using statement and will ensure it is
    //disposed of properly after
    using(SqlConnection sqlConnection = new SqlConnection("Your Connection String"))
    {
         //Use your connection here
    }

    There could be a variety of issues that are similar to this that could cause your issue, however without any code or any additional information, it would really be us just guessing.

    Best Regards,
    Amy Peng


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, September 18, 2013 5:58 AM
    Moderator