[BUGFIX] Sporadic memcache error on server load
authorDmitry Dulepov <dmitry@typo3.org>
Thu, 6 Oct 2011 14:00:54 +0000 (17:00 +0300)
committerGeorg Ringer <mail@ringerge.org>
Sun, 12 Feb 2012 10:12:24 +0000 (11:12 +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: I3d461ef2517d8d10a161c1a1404931543681bb97
Fixes: #30162
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/5600
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Oliver Klee
Reviewed-by: Wouter Wolters
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
t3lib/cache/backend/class.t3lib_cache_backend_memcachedbackend.php

index fec187a..790a1b0 100644 (file)
@@ -282,10 +282,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
                        );
                }
        }