Bug #100123
openRegular exceptions due to dependency injection (di) cache
0%
Description
I have regular error messages in the logs due to Dependency Injection cache /var/cache/code/di. This improved considerably, after switching from shared (NFS) to the VM storage, but has not disappeared.
This also results in error message when loading a page in frontend. When page is loaded again, it is ok. Since (page) cache is warmed up at night and after deployment, these errors are usually not noticed, but it does happen.
Switching to non-NFS:¶
- entire var/cache/code switched to local storage
- when deploying, system cache on all machines must be flushed (and opcache also, of course)
- cache is warmed up during deployment ("@php vendor/bin/typo3 cache:warmup")
The number of log messages with these errors are reduced. Last time I checked, I had roughly 60, all with nearly same timestamp (within 20 seconds).
setup¶
- TYPO3 11.5.24
- dual machines behind load-balancer, however currently only one at a time utilized, other is fallback
- uses the defaults for caching, except what is usually in the DB is in Redis and b13/distributed-locking is used for shared locking. var/cache/di is switched to local storage
Logs¶
ssl_access.log
1)
"Call to a member function resolvePackagePath"
Thu Mar 02 05:26:22 2023] [error] [pid 18699] mod_proxy_fcgi.c(851): [client 54.36.148.228:29271] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function resolvePackagePath() on null in /var/www/mysite/releases/1/public/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php:135
TYPO3 log (logfile if default LogWriter is used, usually in var/log or typo3temp/var/log)
2)
"The temporary cache file .*cache/code/di/.*could not be written"
Thu, 02 Mar 2023 23:36:22 +0100 [CRITICAL] request="825e1a685dff9" component="TYPO3.CMS.Core.Error.ProductionExceptionHandler": Core: Exception handler (WEB: BE): TYPO3\CMS\Core\Cache\Exception, code #1334756737, file /var/www/www.uni-oldenburg.de/releases/115/htdocs/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php, line 232: The temporary cache file "/var/www/www.uni-oldenburg.de/releases/115/var/cache/code/di/640124e6f2270786869194.temp" could not be written. - {"mode":"WEB","application_mode":"BE","exception_class":"TYPO3\\CMS\\Core\\Cache\\Exception","exception_code":1334756737,"file":"/var/www/www.uni-oldenburg.de/releases/115/htdocs/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php","line":232,"message":"The temporary cache file \"/var/www/www.uni-oldenburg.de/releases/115/var/cache/code/di/640124e6f2270786869194.temp\" could not be written.","request_url":"https://mysite/","exception":null}
3)
"Class 'DependencyInjectionContainer_[0-9a-f]*' not found"
Fri, 03 Mar 2023 00:11:29 +0100 [CRITICAL] request="91d0aa2d1ff6e" component="TYPO3.CMS.Core.Error.ProductionExceptionHandler": Core: Exception handler (WEB: BE): Error, code #0, file /var/www/www.uni-oldenburg.de/releases/115/htdocs/typo3/sysext/core/Classes/DependencyInjection/ContainerBuilder.php, line 98: Class 'DependencyInjectionContainer_dfe57bd75f64f6fcd823c25279efdcb969473f70' not found - {"mode":"WEB","application_mode":"BE","exception_class":"Error","exception_code":0,"file":"/var/www/www.uni-oldenburg.de/releases/115/htdocs/typo3/sysext/core/Classes/DependencyInjection/ContainerBuilder.php","line":98,"message":"Class 'DependencyInjectionContainer_dfe57bd75f64f6fcd823c25279efdcb969473f70' not found","request_url":"https://mysite/","exception":null}