Document typeㅣTroubleshooting
CategoryㅣAdministration
Applicable product versionㅣ7FS02PS
Document numberㅣTADTS085
In a customer environment, an ERROR_CACHE_CANT_SWITCH_LOGFILE error occurred, and the connection was immediately terminated during the session authentication stage.
This document summarizes the cause of the error, the background behind the operational design, and the solution.
Issue
09/07 00:45:53.536447 [CLK][0] CHECKPOINT done 3ms, 7 blocks ...
09/07 00:45:53.536477 [CLL][0] requested switch 7 -> 4 (next=..., rth_ckpt=...)
09/07 00:45:53.546320 [FRM][0] THROW. ec=ERROR_CACHE_CANT_SWITCH_LOGFILE(-1063)
[ Log writer is waiting for all logfiles to be archived. ]
09/07 00:45:53.546558 [FRM][0] ERROR_SESS_DISCONNECT(-512046) during user auth
09/07 00:45:53.950460 [CLA][0] LOG GROUP 4 ARCHIVED.
Cause
The following facts were confirmed from an analysis of the TPR report in the customer environment.
- Redo log generation: Approximately 12 MB, which was very small
- Number of redo log switches: Performed more than 20 times
This was caused by repeatedly executing the redo log switch DDL for a DB hot backup, even though no actual data had accumulated in the redo log files.
The more frequently redo log switches are performed, the greater the likelihood of encountering a redo log group whose archiving has not yet been fully completed. When a client attempts to connect at this time, the ERROR_CACHE_CANT_SWITCH_LOGFILE error occurs.
This error is an intended design behavior, not a bug. When log archiving is delayed on a specific node, new session connections are intentionally blocked to prevent the issue from spreading. This is a defensive mechanism.
Solutions
1. Increase the redo log file size: Increase the log file size to extend the interval between log switches
2. Increase the number of redo log groups: Increase the number of groups to reduce the archiving wait time
3. Improvement through a parameter: Setting the _SESS_CONN_CHECK_LOG_SWITCH=N parameter forces session connections to be allowed even while waiting for a log switch. This bypass parameter is provided starting with the Tibero 6 and 7 series patch sets PS04.
This parameter can be applied when patch 331502a is applied.