Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 4.x > Installation and deployment > ASP.NET application_end View modes: 
User avatar
Member
Member
sahuspilwal1981-hotmail - 3/3/2009 5:27:24 AM
   
ASP.NET application_end
Hi Support/Juraj,

I have deployed a new site using web installer on my own dev box to our dedicated production server in data centre. We have Windows 2008 Server running SQL Express 2008, .NET 2.0 and IIS7. I'm using the corporate site portal template and have been monitoring website event log. I'm finding many application_end error relating to hosting environment. I recall discussing this with you previously in version 3.x, however as a process of elimination i'm now running this in dedicated environment, using your corporate template but still it seems I have these errors. See Quote below:


EventID: 13

EventType: E

EventTime: 3/2/2009 4:24:04 PM

Source: Application_End

EventCode: EXCEPTION

EventDescription: Message: HostingEnvironment initiated shutdown
HostingEnvironment caused shutdown<br />
Shutdown stack: at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Environment.get_StackTrace()
at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal()
at System.Web.Hosting.HostingEnvironment.InitiateShutdown()
at System.Web.Hosting.PipelineRuntime.StopProcessing()<br />
Call stack: at Global.Application_End(Object sender, EventArgs e)
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Web.HttpApplication.ProcessSpecialRequest(HttpContext context, MethodInfo method, Int32 paramCount, Object eventSource, EventArgs eventArgs, HttpSessionState session)
at System.Web.HttpApplicationFactory.FireApplicationOnEnd()
at System.Web.HttpApplicationFactory.Dispose()
at System.Web.HttpRuntime.Dispose()
at System.Web.HttpRuntime.ReleaseResourcesAndUnloadAppDomain(Object state)
at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)



I'm finding it hard to understand why after choosing base defaults and following install documentation and pre-requisites that i'm still having these errors from version 3.x to current. Please any thoughts into why this is happening will be much appreciated as I really want to use this tool for our corporate site and to re-sell to our clients however having such errors from early installation is so frustrating.

All the best,

Sahus Pilwal



User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 3/3/2009 5:41:52 AM
   
RE:ASP.NET application_end
Hi Sahus,

It seems the server kills our application. Could you please try to ask your hosting provider what can cause the server restarting?

We have noticed the same problem when server have a limitation of memory for one application and when the application overcomes it it restarts the application.

Best regards,
Helena Grulichova

User avatar
Member
Member
sahuspilwal1981-hotmail - 3/4/2009 5:16:01 AM
   
RE:ASP.NET application_end
Hi Helen/Support,

Just to inform you that we have FULL dedicated server in data centre with FULL RDP access and IIS7, SQL 2008 access etc. IIS logs do not indicate any problems however Kentico CMS logs display application_end error from time to time. Do you think as process of elimination we try a 3.5 .NET framework site instead or 2.0?

Kind regards,

Sahus Pilwal

User avatar
Member
Member
sahuspilwal1981-hotmail - 3/4/2009 10:58:34 AM
   
RE:ASP.NET application_end
Hi Support,

I have done some further tests and am finding the issue is related to the application pool for the Kentico website in IIS. Its recycling and causing the IIS worker process to shutdown and re-start. I've tried both .NET 2.0 and 3.5 builds but both have the same problem. I also have tested this on DiscountASP shared server my dev machine and dedicated server and all default installs have the same problem i.e. once the re-cycle occurs it shuts down the worker process thus logging the event to KenticoCMS stating the hosting environment caused an ASP.NET application_end routine. This also relates to the forum thread in version 3.x where the landing page take time to load. This is again related to the worker process restarting thus causing an application_start method. The site then requires re-compiling into memory causing the homepage to always take time to load between 3 - 10 seconds.

I believe this is a system wide problem. Having gone through the solution partners and there portfolios most of there sites take between 3 - 10 seconds to load the landing page. I can guarantee that most of these sites are suffering from the same hosting environment intiated shutdown and restart problem.

I read somewhere that you can load a complied version of the site to the production server can you please provide a link to this documentation as this could provide a fix. On another note would running the aspx template site be any different to the portal template??

Any thoughts on this would be greatly appreciated.

Kind regards,

Sahus Pilwal

User avatar
Member
Member
sahuspilwal1981-hotmail - 3/4/2009 12:41:44 PM
   
RE:ASP.NET application_end
Hi Support,

I found some information on your developer guide relating to pre-compile and application pool recommendations. I follow these guidelines and see where this takes me.

App Pool details: http://devnet.kentico.com/docs/devguide/configuring_application_pools.htm

Pre Compile details:http://devnet.kentico.com/docs/devguide/pre_compilation_publishing.htm

Kind regards,

Sahus Pilwal

User avatar
Member
Member
krpeters - 3/4/2009 1:59:05 PM
   
RE:ASP.NET application_end
I've experienced this as well, and solved it by unchecking "Shutdown worker processes after being idle" on the Performance tab. For further details, see IIS forums thread and the replies by Paul Lynch.

User avatar
Member
Member
sahuspilwal1981-hotmail - 3/11/2009 7:32:56 AM
   
RE:ASP.NET application_end
Hi,

Thanks for the reply. We have made some adjustments to the application pool on our staging server and whilst the application still ends were finding the re-starts a great deal faster then before. We also made adjustments to IIS caching and KenticoCMS caching. Using IIS stress testing tool we tweaked it to stress at level two and all seem to cope well enough. So all in all i'm happy with this for now.

Thanks for your help.

Regards,

Sahus

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 3/11/2009 11:30:18 AM
   
RE:ASP.NET application_end
Hi,

thank you for information.
We're happy that you're happy :)

Regards,
Zdenek C.

User avatar
Member
Member
ralph - 4/6/2009 5:38:25 PM
   
RE:ASP.NET application_end
Hi Sahus

Can you let us know what kind of adjustments you did to your IIS caching settings? And maybe also Kentico caching?

Thanks
ralph

User avatar
Member
Member
sasdaman - 4/23/2009 2:23:01 PM
   
RE:ASP.NET application_end
Hi Ralph,

This may or may not help. We adjusted the worker processor in IIS7 to recycle every 1 hour and set the idle timeout to 0 minutes so it would never re-cycle after it was in an idle state. This means the website wouldn't restart as often. We found it to restart every 10 - 15 minutes before the change now its once every hour. With regards to Kentico Caching & performance these two posts maybe of help:

http://devnet.kentico.com/Blogs/Martin-Hejtmanek/April-2009/Deep-Dive---Kentico-CMS-Caching.aspx

http://devnet.kentico.com/Blogs/Martin-Hejtmanek/August-2008/Performance-of-Kentico-CMS.aspx

Hope this helps.

Kind regards,

Sahus Pilwal