If a watchdog entry should be written during a different MySQL table is locked it will fail with MySQL error "Table 'watchdog' was not locked with LOCK TABLES". If a watchdog entry should be written during an open transaction and the transaction will be rolled back, the watchdog entry will be removed as well. Both cases could be avoided if we use a dedicated database connection for writing watchdog entries.
The solution is to declare a dedicated database connection which will not be established until required.
If a watchdog entry is written as part of a transaction it should probably be rolled back with that transaction. But for entries of severity WATCHDOG_ERROR or above we should assume that they should be always written. But his behavior has to be optionally configurable in settings.php.
Original issue: https://drupal.org/node/298768
Recent comments
OK, @izmeez, well I have just created a Virtual Machine running Ubuntu 24 and installed the same Backdrop Site as is on the Laptop and It is working fine, so there must be something odd about...
Write Permission Problems on files, ../private and /tmp on my Laptop
Nope, SELinux is not installed. I am running Ubuntu with the KDE Plasma Desktop. Aparmour is enabled by default on both machines I have enabled another site on the Laptop and am...
Write Permission Problems on files, ../private and /tmp on my Laptop
Is this an SELinux issue where you have to also make sure the SELinux permissions are set correctly?
Write Permission Problems on files, ../private and /tmp on my Laptop