[BUGFIX] Sporadic memcache error on server load
authorDmitry Dulepov <dmitry@typo3.org>
Thu, 6 Oct 2011 14:00:54 +0000 (17:00 +0300)
committerSteffen Ritter <info@rs-websystems.de>
Fri, 16 Dec 2011 13:56:06 +0000 (14:56 +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: Ied3da87149e50843f8950395b3003a8cac06dbdc
Resolves: #30162
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/5599
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Oliver Klee
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
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
                        );
                }
        }