Could not write cache record to database: Out of range value for column 'lifetime'
Fresh installation of Typo3 8.7.7 (cal 1.11.1) running under Debian Stretch (Apache 2.4.25 with PHP 7.1.9) and MariaDB 10.2.8 cluster.
Here is an error we get:
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1431458130: Could not write cache record to database: Out of range value for column 'lifetime' at row 1 | RuntimeException thrown in file /var/www/local.net/Web/typo3conf/ext/cal/Classes/Utility/Cache.php in line 89
The workaround was to alter lifetime to BIGINT:
ALTER TABLE tx_cal_cache MODIFY lifetime BIGINT;
Not sure whether this is because of MariaDB 10.2 or PHP 7.1, but any hints would be greatly appreciated.
#1 Updated by Tobias Schaefer 3 months ago
this is definitely caused by mariadb 10.2 not php 7.1.
I have the same issue with TYPO3 8.7.27, cal 1.11.1, mariadb 10.2.25 and php 7.2.5.
Altering the table tx_cal_cache to bigint for the lifetime column worked for me too.
The problem is that cal tries save the value 3153600000 for lifetime. The type int only allows a highest value of 2147483647.
With older versions of mysql (and maybe mariadb too) this didn't lead to an error if you try to save a larger value than possible.
It just saved the highest possible value instead, so 2147483647.
With newer versions of mariadb it leads to an error.
cal 2.0.0 is out since 26.01.2019, so I checked this version, but the lifetime column is still of type int and should be bigint.