Exception in logs

Good morning,
We purchased a licence of powershell universal and we are happy of the tool.
We have only a problem now, in the log file we see this exception:
2021-04-21T13:27:17.4601625+02:00 [INF] Exception during stop. (69827b32)
System.NullReferenceException: Object reference not set to an instance of an object.
at Universal.Server.Services.SecurityProxy.StopAsync() in D:\a\universal\universal\src\Universal.Server\Services\SecurityProxy.cs:line 83
and it seems that after this exception all scheduled job doesn’t work

thanks in advance
Marco

Product: PowerShell Universal
Version: 1.5.15

This exception is typically shown when the server is being stopped. How are you hosting PSU?

Our PSU is hosted on IIS. The OS is windows server 2016 Datacenter an IIS 10

Can you verify if you have set the idle settings for the app pool? Otherwise the jobs wont run because the app pool is being terminated. IIS - PowerShell Universal

I check again the config with the page you suggest and I’ve already set the idle to 0 and all other parameters.
Thanks

You can check to see why the App Pool is recycling by viewing the WAS events in the event log from the IIS server: iis7 - Which event log file does IIS 7 app pool log to - Webmasters Stack Exchange

Hi Adam,
thank for the link. I check in the event viewer and I see this message “serving application pool ‘PowershellUniversal’ has requested a recycle because the worker process reached its allowed processing time limit”. I checked the settings of recycling the app pool and the regular time intervals is set to 1740s (default option). I need to turn off this setting?

Thanks
Marco

Hmm. Usually, with AlwaysRunning set, it should restart the app pool after a recycle like this, and then it will schedule the jobs accordingly. I guess I could be mistaken. If this is the case, we need to add this setting to the documentation as well. You can try disabling this to see if it prevents this from happening.

image

Ok thanks, I try to disable the setting. If I don’t see other shut down I inform you.

Marco

Hi Adam,
I inform you that from last week when I disabled the recycling condition all my jobs work perfectly.

Thanks for your support.
Marco

2 Likes