major
minor
major
minor
When the application starts, a lock is requested to prevent multiple nodes from starting simultaneously and performing initialization tasks at the same time in a cluster environment.
Currently, however, the timeout for this lock is configured inconsistently. The timeout for the lock is 30 minutes, but the startup process waits only 10 minutes to acquire the lock. If a startup fails and a lock remains in the database, the next and subsequent startup attempts will certainly fail as well.
Improvement
The wait time for a startup lock must be at least as long as the lock’s timeout. In some cases, it may be advisable to configure the wait time to be longer than the lock timeout when multiple cluster nodes are starting up.
See tl:StartStopListenerConfig, tl:ConfiguredLockService
Test
- To reproduce the problem in the development environment, the settings in /com.top_logic/src/main/webapp/WEB-INF/conf/devel-ephemeral-locks.config.xml must be commented out (otherwise, the application will not have persistent locks).
- Start the application and terminate it during the startup process.
- Restart the application.
- The application must generate log messages of the form " Could not lock startup token sleeping 10 sec. "
- After 10 minutes, the application must start (new lock timeout for the startup token).