The sitecore keepalive task set in web.config which calls a ‘keepalive’ url is configured to run every hour by default:
<agent type="Sitecore.Tasks.UrlAgent" method="Run" interval="01:00:00">
<param desc="url">/sitecore/service/keepalive.aspx</param>
<LogActivity>true</LogActivity>
</agent>
If the default IIS application pool timeout is 20 minutes, does this not mean that the keepalive function will not work in its default configured state? i.e. a site left idle will invoke this task once at most, potentially keeping the site alive for a further 20 minutes whereupon it will timeout and unload until a real external request arrives.
Unless I’m missing something, this setting should be set to something under 20 minutes (or rather 20min minus the scheduler interval) to work as expected, right?
You are correct that 1 hour is likely too high. By default the keep-alive agent does not work fully out of the box anyway. There are typically two things you need to do to ensure it works best:
interval="00:15:00"/sitecore/service/keepalive.aspxwill only make a request to your site if your site is configured in IIS to bind onlocalhost. The code in the UrlAgent assumes its requestinghttp://localhost/sitecore/service/keepalive.aspx. 99% of the time you’d want to adjust this to be a public URL to your site, e.g.http://www.mysite.com/sitecore/service/keepalive.aspx