Keep alive task

1 month ago
Hello!

We are using nopCommerce 4.0.  If the keep alive task is running on my site every 60 seconds, should I ever see the "Application Started" log entry (except for times I restarted it on purpose)?

It seems to me that if the site is being kept alive, the application should never need to start up.

Am I right?  If so, what could be going wrong with the keep alive task?

Thanks!

Jeremy
1 month ago
If you are using windows server, this might happen due to app pool recycling.
1 month ago
[email protected] wrote:
If the keep alive task is running on my site every 60 seconds, should I ever see the "Application Started" log entry

No it only hits the keepalive url and does not restart the applciation

Could be something else restarting the application.
For a test turn off the Keep Alive task ti check
1 month ago
If I look in IIS at the app pool recycling settings, I see it's set to 1740 minutes.  I always thought that the server would not recycle if it were being kept alive -- even at the 1740 minute interval?  Have I been wrong for years?
1 month ago
[email protected] wrote:
If I look in IIS at the app pool recycling settings, I see it's set to 1740 minutes.  I always thought that the server would not recycle if it were being kept alive -- even at the 1740 minute interval?  Have I been wrong for years?

Unfortunately yes, you have to set 0, if you don't want regular interval recycle.
1 month ago
You've just blown my mind and rocked my comfortable grasp on reality.  What other incorrect assumptions have I labored under?

Thank you for this.  I will see if this knowledge helps me solve a problem.

Jeremy
1 month ago
I'm not sure if "this might happen due to app pool recycling".  Because,...
"By default IIS uses the overlapped recycle method, which keeps the old process up until the current requests are finished processing (or a set timeout elapses) while the new process handles new requests. This ensures service continuity so that you usually do not notice a recycle."

You should check the Windows Event Logs to see what is causing recycling (e.g. memory exceeded, etc.)