So, I have been working on the upgrade of a very large Sitecore instance. As part of the upgrade, you have to rebuild the search indexes. This is a very time consuming process, so I was starting it at the end of the working day – but it kept failing.
I noticed that the logs showed the application pool restarting at almost exactly 2200. This made me a little suspicious, so I checked the application pool’s ‘Recycling…’ settings.
Ah. The application pool is set to recycle at 10pm each day. Yup, that would cause a problem.
You can also configure the application pool to recycle at a fixed period each day too. By default this is 29 hours (and there’s an interesting article about why).
However, I suspect that a full reindex of my Sitecore system could take longer than a day (maybe even longer than 29 hours), so that would suggest that:
Before reindexing large Sitecore systems, make sure that application pool recycling is turned off.