1

I have a C# based WebAPI, built along with a Startup task (defined in global.ascx.cs) to connect with a Identity Provider and to take the necessary static data to the memory. For the moment I use a singleton based list (repository pattern) for storage. With this going to deploy to IIS, with the application inactive timeouts (i have disabled it for the moment) and application recycle configurations, the app pool getting idle on weekends, and at the first time start its taking around 2-3 mins to start (mainly due to the sync process is taking around 2 mins)

So is there anyway, I can fix this without switching of both inactive timeouts and recycle. I know that one way is to take this to a Redis based cache which will resolve this issue, but will take time for that and already in my consideration. Is there a way the app pool recycle will call back a method in the webapi, once the recycling is done?

Gayan Dinuzhka
  • 331
  • 2
  • 5
  • 16

0 Answers0