joelie
  •  joelie
  • 52.4% (Neutral)
  • YAF Forumling Topic Starter
2012-06-26T00:02:11Z
I have a new install of v1.9.6.1 on IIS7.5 (Win2008 R2). The forum is working well, except for the first time the forum loads - its extremely slow to load, around 10 or 20 seconds to display the page. After that, it's fast and has no real speed/loading issues.

I assume this is related to the app pool, however I've never experienced this delay with other .net apps so not 100% sure if there is a setting specific to the forum setup that is causing this.

Any suggestion as to what I should be looking for to fix this issue?
Sponsor
squirrel
2012-06-26T02:30:08Z
What you're seeing is 'application startup time' - the only thing that can really be done to prevent it is to set IIS not to shutdown the application pool if it is idle. IIS shutdown default is 20 minutes if idle, with a forced recycle every 1740 minutes. On one of my fairly active sites, I have it set not to shutdown the pool if it is idle, and to do a forced recycle once a week. If YAF is the only application in the pool, that would probably work, but you would have to play with the numbers to suit your own needs. If there are other applications in the pool, you will want to watch for memory leaks before you set your server not to recycle the pool for extended periods of time. YAF performs very well for me with a long pool time, but other applications in the mix can affect that greatly. A pool that is leaking memory can drown an IIS server until the pool recycles or you get a rapid-fail restart from IIS monitoring performance on it's own.

If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
joelie
  •  joelie
  • 52.4% (Neutral)
  • YAF Forumling Topic Starter
2012-06-26T03:06:39Z
Thanks for the info.

There are a few sites running off the same App Pool. I've already reduced the recycle time for the app pool. If I setup a new app pool, reduce the recycle time and set IIS to not shutdown the app pool, is that the best workaround?
squirrel
2012-06-26T03:16:51Z
By isolating YAF into it's own APP pool, you can set a long recycle time, say several days instead of the default of 27 hours -- then you will want to adjust the Idle Shutdown time -- on mine (which is a fairly active site), we have disabled the idle recycle completely to avoid the restart delay. It is truly a matter of preference vs. maintaining server stability. I have about 150 sites on that server (2 Quad-Core XEON processors with 4GB ram on it and 250gb storage), many have their own AppPool, and 95% of them have a 5 minute idle timeout, and a default recycle of 27 hours. But we have three or four sites that have .NET applications on them (one being YAF) and they are all set with a idle timeout of '0' to disable the idle shutdown, and a forced recycle period of just under 7 (10080 minutes for IIS) days. Again - these numbers are what worked for us in our circumstances, but you may need to play with them some, and monitor how your IIS is performing to be sure.

Like I said, if you have an application that is 'leaking' memory and otherwise not very well optimized, if you give it a long Recycle interval, you can suffer from that pool consuming memory and resources and dragging down IIS in the process - so as you adjust, be sure to monitor performance accordingly to find that 'sweet spot' configuration that works for you.

The big thing that is slowing the .NET applications down is that they are re-compiled every time IIS recycles. Many YAF components are 'pre-compiled' but there is still time needed for ASP.NET to create and start serving it's temporary compiled files, which is where you are seeing the lag from. Depending on your server hardware, possibly faster hard drives may help but it won't be that much help that it's worth re-commissioning a server over it, if you know what I mean.

Essentially, it's not going to be a 'true' workaround, but more of a performance optimization - you'll basically just be tuning your IIS to react differently to your installed applications.
If you can't find it using the forum search, try my signature link -- searches this site using Google: Google is my Friend 
joelie
  •  joelie
  • 52.4% (Neutral)
  • YAF Forumling Topic Starter
2012-06-26T03:22:58Z
Great info, thanks :)

I'll get back to work on tweaking for performance as suggested.
joelie
  •  joelie
  • 52.4% (Neutral)
  • YAF Forumling Topic Starter
2012-07-25T07:33:06Z
I managed to find a fix for this issue. After trying an isolated app pool with 0 idle timeout, there was no difference in the startup time for the forum.

The workaround I implemented is working brilliantly so far. The workaround required installing the IIS Application Initialisation module (for IIS7.5) and then adding in the required web.config entries. The module works by calling a user specified page after app pool idle timeout to essentially keep the app alive. It's taken the forum default page load time from about 15-30 seconds down to virtually instant every time I had tested it.

I hope this will help the next person!
Dunka
  •  Dunka
  • 50.6% (Neutral)
  • YAF Forumling
2012-07-25T18:15:05Z
I'm attempting this method as well, as I am having the same issue with only one of my forums. I run YAF on three different sites. Two of them were on 1.9.4 and I upgraded them both last week to 1.9.6. Both of those run with zero issue. The load times, even after sleeping, are within a second or two. However, the one I'm having issues with is a fresh install of 1.9.6. All 3 run on the same server with the same configuration and it can take upwards of a minute to load on initialize. It also takes up an insane amount of memory on load, upwards of 30% of free memory, just to initialize.

I'm hoping this module works, thanks for the input!

EDIT: Just to update, this method did fix my problem!

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved