# Memcached

**URL:** <https://forum.shopware.com/t/memcached/49390>\
**Category:** Allgemein\
**Created:** [10. November 2017 um 10:14 UTC](https://forum.shopware.com/t/memcached/49390 "2017-11-10T10:14:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![livaro2014](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@livaro2014](https://forum.shopware.com/u/livaro2014)\
**Post date:** [10. November 2017 um 10:14 UTC](https://forum.shopware.com/t/memcached/49390/1 "2017-11-10T10:14:32Z")

</div>

Was muss ich in die config.php eintragen, um memcache nutzen zu können?

Vielen Dank

---

<div class="post-metadata">

**Author:** ![DanielNogel](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@DanielNogel](https://forum.shopware.com/u/DanielNogel)\
**Post date:** [10. November 2017 um 12:28 UTC](https://forum.shopware.com/t/memcached/49390/2 "2017-11-10T12:28:35Z")

</div>

Hi,

das Beispiel findest du hier:&nbsp;[Shopware Session handling](https://developers.shopware.com/sysadmins-guide/sessions/#memcached)

Damit sollte es schon gehen.

Besten Gruß

Daniel

---

<div class="post-metadata">

**Author:** ![SB1](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@SB1](https://forum.shopware.com/u/SB1)\
**Post date:** [10. November 2017 um 23:14 UTC](https://forum.shopware.com/t/memcached/49390/3 "2017-11-10T23:14:21Z")

</div>

Die Einstellungen, die Daniel erwähnte, passen. Ist Dein MemCached Daemon auf dem Server denn auch aktiv ?

Test:

ps -ef | grep memcached

---

<div class="post-metadata">

**Author:** ![livaro2014](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@livaro2014](https://forum.shopware.com/u/livaro2014)\
**Post date:** [11. November 2017 um 03:37 UTC](https://forum.shopware.com/t/memcached/49390/4 "2017-11-11T03:37:13Z")

</div>

Ja alles aktiv vielen dank

---

<div class="post-metadata">

**Author:** ![Hotte](https://avatars.discourse-cdn.com/v4/letter/h/90db22/32.png) [@Hotte](https://forum.shopware.com/u/Hotte)\
**Post date:** [5. Februar 2018 um 13:38 UTC](https://forum.shopware.com/t/memcached/49390/5 "2018-02-05T13:38:41Z")

</div>

Hi, ich bekomme nach dem aktivieren von Memcached&nbsp; in SW immer folgende Fehlermeldung:

```
Ups! Ein Fehler ist aufgetreten!
Die nachfolgenden Hinweise sollten Ihnen weiterhelfen.

Zend_Session::start() - /var/www/vhosts/DOMAIN.de/httpdocs/_dev/engine/Library/Zend/Session.php(Line:481): Error 
#2 session_start(): Unable to clear session lock record in engine/Library/Zend/Session.php on line 494 Stack trace: 
#0 engine/Shopware/Plugins/Default/Backend/Auth/Bootstrap.php(372): Zend_Session::start(Array) 
#1 engine/Library/Enlight/Event/Handler/Plugin.php(149): Shopware_Plugins_Backend_Auth_Bootstrap->onInitResourceBackendSession(Object(Enlight_Event_EventArgs)) 
#2 engine/Library/Enlight/Event/EventManager.php(255): Enlight_Event_Handler_Plugin->execute(Object(Enlight_Event_EventArgs)) 
#3 engine/Shopware/Components/DependencyInjection/Container.php(208): Enlight_Event_EventManager->notifyUntil('Enlight_Bootstr...', Object(Enlight_Event_EventArgs)) 
#4 engine/Shopware/Components/DependencyInjection/Container.php(167): Shopware\Components\DependencyInjection\Container->doLoad('backendsession') 
#5 engine/Shopware/Plugins/Default/Backend/Auth/Bootstrap.php(387): Shopware\Components\DependencyInjection\Container->load('backendsession') 
#6 engine/Library/Enlight/Event/Handler/Plugin.php(149): Shopware_Plugins_Backend_Auth_Bootstrap->onInitResourceAuth(Object(Enlight_Event_EventArgs)) 
#7 engine/Library/Enlight/Event/EventManager.php(255): Enlight_Event_Handler_Plugin->execute(Object(Enlight_Event_EventArgs)) 
#8 engine/Shopware/Components/DependencyInjection/Container.php(208): Enlight_Event_EventManager->notifyUntil('Enlight_Bootstr...', Object(Enlight_Event_EventArgs)) 
#9 engine/Shopware/Components/DependencyInjection/Container.php(146): Shopware\Components\DependencyInjection\Container->doLoad('auth', 1) 
#10 engine/Shopware/Plugins/Default/Backend/Auth/Bootstrap.php(225): Shopware\Components\DependencyInjection\Container->get('auth') 
#11 engine/Shopware/Plugins/Default/Backend/Auth/Bootstrap.php(206): Shopware_Plugins_Backend_Auth_Bootstrap->checkAuth() 
#12 engine/Library/Enlight/Event/Handler/Plugin.php(149): Shopware_Plugins_Backend_Auth_Bootstrap->onPreDispatchBackend(Object(Enlight_Controller_ActionEventArgs)) 
#13 engine/Library/Enlight/Event/EventManager.php(218): Enlight_Event_Handler_Plugin->execute(Object(Enlight_Controller_ActionEventArgs)) 
#14 engine/Library/Enlight/Controller/Action.php(137): Enlight_Event_EventManager->notify('Enlight_Control...', Object(Enlight_Controller_ActionEventArgs)) 
#15 engine/Library/Enlight/Controller/Dispatcher/Default.php(530): Enlight_Controller_Action->dispatch('storeListingAct...') 
#16 engine/Library/Enlight/Controller/Front.php(223): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp)) 
#17 engine/Shopware/Kernel.php(191): Enlight_Controller_Front->dispatch() 
#18 vendor/symfony/http-kernel/HttpCache/HttpCache.php(484): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) 
#19 engine/Shopware/Components/HttpCache/AppCache.php(268): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL) 
#20 vendor/symfony/http-kernel/HttpCache/HttpCache.php(251): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true) 
#21 engine/Shopware/Components/HttpCache/AppCache.php(105): Symfony\Component\HttpKernel\HttpCache\HttpCache->pass(Object(Symfony\Component\HttpFoundation\Request), true) 
#22 shopware.php(118): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request)) #23 {main}  
OK

```

vielleicht hat jemadn einen Tipp ?

&nbsp;

Danke und viele Grüße

---

<div class="post-metadata">

**Author:** ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)\
**Post date:** [5. Februar 2018 um 13:52 UTC](https://forum.shopware.com/t/memcached/49390/6 "2018-02-05T13:52:34Z")

</div>

Schau mal hier:&nbsp;[Session lock record with PHP 7.0.9 · Issue #269 · php-memcached-dev/php-memcached · GitHub](https://github.com/php-memcached-dev/php-memcached/issues/269)

Glaube das ist ein Problem von Memcached

---

<div class="post-metadata">

**Author:** ![Hotte](https://avatars.discourse-cdn.com/v4/letter/h/90db22/32.png) [@Hotte](https://forum.shopware.com/u/Hotte)\
**Post date:** [5. Februar 2018 um 14:49 UTC](https://forum.shopware.com/t/memcached/49390/7 "2018-02-05T14:49:05Z")

</div>

Danke, den Thread hatte ich auch schon offen… aber wie benutzen andere dann Memcached ?

Bzw. geht man dann auf redis und verzichtet auf Session Locking ?

---

<div class="post-metadata">

**Author:** ![don](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@don](https://forum.shopware.com/u/don)\
**Post date:** [5. Februar 2018 um 15:20 UTC](https://forum.shopware.com/t/memcached/49390/8 "2018-02-05T15:20:58Z")

</div>

Dazu gibt es auch einen Bug Eintrag

> **[Shopware Issuetracker](https://issues.shopware.com/issues/SW-20416)**

Wir nutzen Memcached wegen dem gleichen Fehler nur für das Frontend. Das Problem trat bei uns nur im Backend auf…

---

<div class="post-metadata">

**Author:** ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)\
**Post date:** [5. Februar 2018 um 16:43 UTC](https://forum.shopware.com/t/memcached/49390/9 "2018-02-05T16:43:24Z")

</div>

> [@Hotte schrieb:](https://forum.shopware.com/profile/20848/Hotte "Hotte")
> 
> Danke, den Thread hatte ich auch schon offen… aber wie benutzen andere dann Memcached ?
> 
> Bzw. geht man dann auf redis und verzichtet auf Session Locking ?

Persönlich würde ich sagen, dass wenn dein Redis schnell genug ist, du die Probleme mit dem Session Locking vernachlässigen kannst.  
Das muss man halt gegeneinander abwiegen.&nbsp;
