Acorn Calendar Year Calculation fails but does not provide associated details, like in the Performance Analyzer screen shot below:
By investigating application logs, it is determined that it failed on Calculating Cost Rates step. The associated log from the application server finally gives a hint on the cause:
Log Name: System
Date: 4/5/2018 12:00:17 PM
Event ID: 5074
Task Category: None
A worker process with process id of '19728' serving application pool 'PA5GAppPoolDOMAIN'
has requested a recycle because the worker process reached its allowed processing time limit.
This warning message points to the application server pool being recycled prior to completion of the calculation. The time also coincides when the calculation was at "Calculating costs from rates" step. When application pool is recycled, it will terminate the connection to the database and if it's in the middle of the calculation, then the process will be broken.
During Calculation, application generates the series of SQL statements and orchestrates the execution of these scripts in the DB server, remaining idle while the DB server is busy executing each script. When DB server sends back a successful message, the application releases next one to be executed. Otherwise, an error message is logged and it will be evident on the scenario messages. When the application pool recycles, the application restarts and can't recover, so calculation cannot proceed. Acorn then checks any unfinished calculation and mark it as failed but no error message can be logged.
In this case, for a single application pool managed application, administrator should tune Application Server to prevent recycling to occur during the processing. Common setup is done at a 7200 minutes interval, as done below:
1. Open Application Pools box, select PA5GAppPool<DOMAIN> and click on the Advanced Settings:
2. Change Regular Time Interval setting (here at recommended 7200) to a safer value at Recycling session. Then make sure there is not a Specific Time set up for the processes, by clicking button at TimeSpan Array:
Important: Even if recycling is set at a very high interval, there's still a remote chance that the next occurrence will coincide during calculation, depending on the elapsed time. Ideally the solution for this application would be working with multiple application pools, alternating between them in long processing jobs. It's not a recommended measure to entirely remove the recycling setting, due to other issues that the settings prevents.