Short-description-of-the-following-content


Occasionally the following output appears in the server log: ..database lock with waiter detected...
The message is mostly uncritical. We explain here what it means.

Typical message in the server log:
2015.09.25-10:35:03.109 WARNING: T022: CheckLocks.check: CommandExecutor: customer.20140825.001410.448[system]: database lock with waiter detected: lock holder sess=39 type=TX request=none mode=exclusive (X ) id1=393248 id2=51078 SELECT t0.id, t0.version, t1.sid, t1.asset_id, t1.asset_version, t1.element_idx, t1.key, t1.filesys_name, t1.mimetype, t1.mimetype_internal, t1. relpath, t1.state, t1.archivesys_name, t1.archive_id, t1.doctype, t1.app_version, t1.original_path, lock waiter sess=405 type=TX request=share (S) mode=none id1=393248 id2=51078 UPDATE asset t0 SET t0.currversion = :1 , t0.state = :2 , t0.checked_out_by = :3 , t0.checked_out_date = :4 , t0.tcn = :5 WHERE ((t0.id = :6 AND t0.version = :7 ) AND t0.tcn = :8 )

This is behind it:
This log output is issued prophylactically by a WatchDog for monitoring purposes.
Of course, because of the many parallel processes, one process will have to wait for another process, in this case another Oracle transaction to complete. This is normal and planned behavior.
This is critical if and only if a process keeps an Oracle transaction open for a longer period of time, locking relevant things and thus blocking other processes. And that is only critical if the blocked processes are user-relevant processes. There are many background processes that run one after the other and wait for one another: preview creation, text preview creation, worst workflow calculation, deadline calculation, further image conversions, attribute inheritance, etc.
The WatchDog runs every 5 minutes. You can find it in the server log like this:
admin.maintenance.check-locks

_______________________________________________________________________________________________________


Gelegentlich kommt es zu folgender Ausgabe im Serverlog: ..database lock with waiter detected...
Die Meldung ist meistens unkritisch. Wir erklären hier was sie bedeutet.

Typische Meldung im Serverlog:

2015.09.25-10:35:03.109 WARNING: T022: CheckLocks.check: CommandExecutor: customer.20140825.001410.448[system]: database lock with waiter detected: lock holder sess=39 type=TX request=none mode=exclusive (X) id1=393248 id2=51078 SELECT t0.id, t0.version, t1.sid, t1.asset_id, t1.asset_version, t1.element_idx, t1.key, t1.filesys_name, t1.mimetype, t1.mimetype_internal, t1.relpath, t1.state, t1.archivesys_name, t1.archive_id, t1.doctype, t1.app_version, t1.original_path, lock waiter sess=405 type=TX request=share (S) mode=none id1=393248 id2=51078 UPDATE asset t0 SET t0.currversion = :1 , t0.state = :2 , t0.checked_out_by = :3 , t0.checked_out_date = :4 , t0.tcn = :5 WHERE ((t0.id = :6 AND t0.version = :7 ) AND t0.tcn = :8 )

Das steckt dahinter:

Diese Log-Ausgabe wird durch einen WatchDog zu Monitoring-Zwecke prophylaktisch ausgegeben.
Selbstverständlich kommt es aufgrund der vielen parallelen Prozesse dazu, dass ein Prozess auf einen anderen Prozess warten muss, in diesem Fall auf die Beendigung einer anderen Oracle-Transaktion. Das ist ein normales und geplantes Verhalten.
Kritisch ist das dann und nur dann, wenn ein Prozess über einen längeren Zeitraum eine Oracle-Transaktion offen hält, dabei relevante Dinge sperrt und damit andere Prozesse blockiert. Und das ist auch nur kritisch, wenn es sich bei den blockierten Prozessen um User-relevante Prozesse handelt. Es gibt viele Background-Prozesse, die nacheinander ablaufen und entsprechend aufeinander warten: Preview-Erstellung, Text-Preview-Erstellung, Worst-Workflow-Berechnung, Deadline-Berechnung, Weitere Bildumwandlungen, Attribut-Vererbungen, etc.
Der WatchDog läuft alle 5 Minuten. Man kann ihn so im Serverlog finden:
admin.maintenance.check-locks