Skip to Content

Test Always Running Behavior

Overview

This setting can be a little tricky to test. The Vinyl Scheduler runs within the IIS process. The problem is that to release memory IIS recycles its application pools each day by default. Once an application pool is recycled, by default, IIS waits for the first user to login to Vinyl, then starts the application pool.

This means that the default behavior of IIS will stop the Vinyl application, and the scheduler will stop running until next user logs into IIS.

As an extreme example, assume there is an event scheduled to run on Sunday at 2 A.M. IIS recycles the Vinyl application Saturday at midnight, and nobody logs into Vinyl until Monday morning. In this example, the scheduler would be offline until Monday morning when the first user logs in, starting the application and defeating the purpose of having an event scheduled for Sunday at 2 A.M.

To manually test whether the 'Always Running' is working, there are a couple options, but both techniques require asking users not to use Vinyl during the test. If a user logs into Vinyl while testing this feature, it invalidates the test because IIS loads the application pool when the user accesses Vinyl.

Check the Windows Event Logs

When IIS recycles the application pool, a log entry is added to the windows event log with a source of WAS. To find the log entry, open up the Windows Event Viewer on the web server.

  1. Locate the system entries:

    Image 2016 10 26 9 44 6

  2. Find an event with Source of WAS and entry similar to:

    Image 2016 10 26 9 56 56

  3. Check the details to see if the event is the Vinyl Application pool being recycled. If so, then this event represents IIS recycling the Vinyl application pool:

    Image 2016 10 26 9 46 46

  4. Check the date and time of the event. The goal of the Always Running setting is that immediately after the application pool is recycled, the Vinyl application should start itself. To determine this, locate your Vinyl logs and find log entries that match the date and time of this recycle event. The logs are in the Vinyl installation folder under App_Data:

    Image 2016 10 26 9 58 33

Notice, that at 9:52:42 AM the Application Pool recycled. Then notice in the Vinyl log that at 9:52:45 (within 3 seconds), the Vinyl Application has restarted. This indicates that the Always Running setting is working for your environment. The application did not wait until somebody logged into Vinyl, it started immediately after the application pool was recycled. Again, this test assumes nobody is currently using Vinyl. If you want to confirm that no users accessed Vinyl at this time, forcing the application to start, check the IIS logs, default folder:

C:\inetpub\logs\logfiles\w3scv1\

Confirm there are no requests that correspond to the time and date that the application started.

Manually Confirm the Setting

Again, this needs to performed when nobody is using Vinyl or the test will be invalid.

  1. Stop IIS. From an administrative command line, enter: iisreset /stop

    Image 2016 10 26 10 7 28

  2. Wait a minute prior to starting it back up again. Then enter: iisreset /start

    Image 2016 10 26 10 10 20

Once started, check the Vinyl application logs in the Vinyl installation directory under App_Data. There should be a log entry indicating that the application started immediately after you started IIS.

Note

This could take longer if using the Windows Scheduled Task to ping Vinyl)

Image 2016 10 26 9 58 33

Check the date and time to confirm that is accurate (immediately after the time you started IIS). Again, this test is not valid if a user is accessing Vinyl their requests will also immediately start the application pool.

By default IIS is set to restart every 29 hours (so that the Application Pool is restarting at different times every day). You should configure a specific time of day when the Application Pool restarts, and be sure that this time does not interfere with scheduled background jobs.:

Image 2016 10 26 10 13 45

At this point you can choose a time that you know users will not be accessing the system. You can then check the Event Logs to confirm that the application pool recycled at the specified time (steps included in the first option), and you can check the Vinyl application logs to confirm that the Vinyl application immediately started after the application pool recycled.

If the application is automatically starting after the application pool has recycled, then the scheduler will always be running.

Troubleshooting

If testing is not successful, the following section contains some common issues that have been encountered while implementing the auto start behavior.

Application Initialization is now configured correctly. Following are links indicating how to test the behavior or trouble shoot some common issues that have been encountered.

Troubleshoot Auto Start Behavior