[BUGFIX] Sporadic memcache error on server load
authorDmitry Dulepov <dmitry@typo3.org>
Thu, 6 Oct 2011 14:00:54 +0000 (17:00 +0300)
committerXavier Perseguers <xavier@typo3.org>
Tue, 6 Mar 2012 09:17:06 +0000 (10:17 +0100)
Memcache server sometimes closes connection under heavy load. In
such cases TYPO3 shows error messages in Frontend when setting
the value to cache fails. This should not happen because it is
not such a error that should cause server down times. Change the
exception to a warning in sys_log instead. Admins can see the
error and work on it.

Change-Id: I43e9356658d06f9101e1b488519ec76af6319d2d
Fixes: #30162
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/7411
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
t3lib/cache/backend/class.t3lib_cache_backend_memcachedbackend.php

index 22676e9..6c0f684 100644 (file)
@@ -271,10 +271,10 @@ class t3lib_cache_backend_MemcachedBackend extends t3lib_cache_backend_AbstractB
                                );
                        }
                } catch (Exception $exception) {
-                       throw new t3lib_cache_Exception(
-                               'Could not set value. ' .
-                               $exception->getMessage(),
-                               1207208100
+                       t3lib_div::sysLog(
+                               'Memcache: could not set value. Reason: ' . $exception->getMessage(),
+                               'Core',
+                               t3lib_div::SYSLOG_SEVERITY_WARNING
                        );
                }
        }