# Fatal error: Uncaught RuntimeException: Could not write cacheKey

**URL:** <https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249>\
**Category:** Sonstiges\
**Created:** [25. Februar 2019 um 18:22 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249 "2019-02-25T18:22:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![im3](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@im3](https://forum.shopware.com/u/im3)\
**Post date:** [25. Februar 2019 um 18:22 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/1 "2019-02-25T18:22:24Z")

</div>

Hey Ihr,

ich habe mein shopware auf 5.5.7 updatet und promt eine Tolle Fehlermeldung im frontend erhalten:

**Fatal error** : Uncaught RuntimeException: Could not write cacheKey “ci7c1c97df17c066924822b0af09a65251554962c61e23329aed04cd19020dc3b8” in /www/htdocs/w01859de/ichmichmirmeins.de/engine/Shopware/Components/HttpCache/Store.php:206 Stack trace: #0 /www/htdocs/w01859de/ichmichmirmeins.de/vendor/symfony/http-kernel/HttpCache/HttpCache.php(556): Shopware\Components\HttpCache\Store-\>write(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component\HttpFoundation\Response)) #1 /www/htdocs/w01859de/ichmichmirmeins.de/engine/Shopware/Components/HttpCache/AppCache.php(218): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>store(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component\HttpFoundation\Response)) #2 /www/htdocs/w01859de/ichmichmirmeins.de/vendor/symfony/http-kernel/HttpCache/HttpCache.php(423): Shopware\Components\HttpCache\AppCache-\>store(Object(Symfony\Component\HttpFoundation\Request), Object(Symfony\Component\HttpFoundation\Response)) #3 /www/htdocs/w01859de/ichmichmirmeins.de/vendor in&nbsp; **/www/htdocs/w01859de/ichmichmirmeins.de/engine/Shopware/Components/HttpCache/Store.php** &nbsp;on line&nbsp; **206**

&nbsp;

Ich hoffe mir kann&nbsp; jmd. helfen. Vielen Dank!

---

<div class="post-metadata">

**Author:** ![im3](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@im3](https://forum.shopware.com/u/im3)\
**Post date:** [25. Februar 2019 um 18:24 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/2 "2019-02-25T18:24:07Z")

</div>

In der log datei ist folgendes dazu zu finden:

Warm up http-cache error with shopId 1 Server error response

---

<div class="post-metadata">

**Author:** ![im3](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@im3](https://forum.shopware.com/u/im3)\
**Post date:** [25. Februar 2019 um 18:36 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/3 "2019-02-25T18:36:19Z")

</div>

Liegt daran, dass wenn der HttpCache unter Einstellungen aktiviert ist, kommt die Fehlermeldung. Nun wäre es bzgl. Performance schon nicht schlecht, wenn Bilder, etc. ständig neugelanden werden müssten. Kann es sein, dass ich auf die oben genanten php Dateien ein anderes Zugriffsrecht einstellen muss? Also via FTP auf die Datei Zugriffsrecht für Gruppen und Öffentlich evt. auch auf schreiben setzen?

---

<div class="post-metadata">

**Author:** ![kulli](https://avatars.discourse-cdn.com/v4/letter/k/a3d4f5/32.png) [@kulli](https://forum.shopware.com/u/kulli)\
**Post date:** [25. Februar 2019 um 19:16 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/4 "2019-02-25T19:16:02Z")

</div>

Möglicherweise hast Du den cache nicht geleert und das theme nicht kompiliert nach dem Update ? Und den Browser cache ?

> **[Shopware 5 - Update Guides - Shopware aktualisieren / updaten](https://docs.shopware.com/de/shopware-5-de/update-guides/shopware-aktualisieren-updaten?category=shopware-5-de%2Fupdate-guides)**

---

<div class="post-metadata">

**Author:** ![im3](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@im3](https://forum.shopware.com/u/im3)\
**Post date:** [25. Februar 2019 um 20:31 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/5 "2019-02-25T20:31:19Z")

</div>

nein leider ist es das nicht. alles mehrmals gemacht.

---

<div class="post-metadata">

**Author:** ![hsoebbing](https://avatars.discourse-cdn.com/v4/letter/h/898d66/32.png) [@hsoebbing](https://forum.shopware.com/u/hsoebbing)\
**Post date:** [26. Februar 2019 um 07:54 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/6 "2019-02-26T07:54:44Z")

</div>

Vermutlich gibt es da tatsächlich ein Problem, bitte ändere mal diese Zeile:&nbsp;[shopware/Store.php at 9417d1b4a37d8e038facd55df8a6b9c87bb39771 · shopware/shopware · GitHub](https://github.com/shopware/shopware/blob/9417d1b4a37d8e038facd55df8a6b9c87bb39771/engine/Shopware/Components/HttpCache/Store.php#L205)

Zu:

```
if (!false === $this->save($key, json_encode($content))) {

```

Vermutlich ist der Wert den die Methode zurück liefert&nbsp;leer aber nicht `false` und wirft daher diesen Fehler.

---

<div class="post-metadata">

**Author:** ![ITSchweitzer](https://avatars.discourse-cdn.com/v4/letter/i/f14d63/32.png) [@ITSchweitzer](https://forum.shopware.com/u/ITSchweitzer)\
**Post date:** [26. Februar 2019 um 08:54 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/7 "2019-02-26T08:54:08Z")

</div>

Hi, wir haben genau das selbe Problem nach Update auf 5.5.7, zum Glück im Staging System.

&nbsp;

Tja es erweist sich doch immer wieder als Klug niemals ein Update direkt nach Erscheinen aufzuspielen. Eigentlich wollten wir auch 5.5.6 .

Dann hoffen wir mal das Shopware dies schnell erledigt…

---

<div class="post-metadata">

**Author:** ![im3](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@im3](https://forum.shopware.com/u/im3)\
**Post date:** [26. Februar 2019 um 08:55 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/8 "2019-02-26T08:55:18Z")

</div>

Super vielen lieben Dank! Jetzt geht’s wieder mit dem HTTP Cache.

---

<div class="post-metadata">

**Author:** ![hsoebbing](https://avatars.discourse-cdn.com/v4/letter/h/898d66/32.png) [@hsoebbing](https://forum.shopware.com/u/hsoebbing)\
**Post date:** [26. Februar 2019 um 14:12 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/9 "2019-02-26T14:12:46Z")

</div>

@im3‍ Hast Du an dem Server den HTTP-Cache debug-Parameter an? Wenn Du den ausschaltest sollte der Fehler auch verschwinden.

---

<div class="post-metadata">

**Author:** ![im3](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@im3](https://forum.shopware.com/u/im3)\
**Post date:** [26. Februar 2019 um 20:21 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/10 "2019-02-26T20:21:54Z")

</div>

> [@hsoebbing schrieb:](https://forum.shopware.com/profile/25327/hsoebbing "hsoebbing")
> 
> @im3‍ Hast Du an dem Server den HTTP-Cache debug-Parameter an? Wenn Du den ausschaltest sollte der Fehler auch verschwinden.

Bei meinem Hosting Server? Oder im Shop Backend?&nbsp;

---

<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:** [26. Februar 2019 um 20:51 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/11 "2019-02-26T20:51:39Z")

</div>

In der config.php des Shops.

---

<div class="post-metadata">

**Author:** ![im3](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@im3](https://forum.shopware.com/u/im3)\
**Post date:** [27. Februar 2019 um 12:43 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/12 "2019-02-27T12:43:01Z")

</div>

ja da ist unter:

1. 

_// Http-Cache_  
2.  
‘httpCache’ =\> [  
3.  
‘enabled’ =\> **true** , _// true or false_  
4.  
‘debug’ =\> **true** ,  
5.  
],  
6.  
&nbsp;  
7.  
);

das debug true…soll ich das auf false machen? und dann in der store.php line 205 deine Input wieder rückgängig?

&nbsp;

---

<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:** [27. Februar 2019 um 12:59 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/13 "2019-02-27T12:59:29Z")

</div>

ja, genau.

---

<div class="post-metadata">

**Author:** ![ITSchweitzer](https://avatars.discourse-cdn.com/v4/letter/i/f14d63/32.png) [@ITSchweitzer](https://forum.shopware.com/u/ITSchweitzer)\
**Post date:** [27. Februar 2019 um 20:07 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/14 "2019-02-27T20:07:01Z")

</div>

Hm, ist dies gar kein allgemeines Problem, das Shopware mit einem neuen Update direkt wieder beheben wird?

---

<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:** [27. Februar 2019 um 20:23 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/15 "2019-02-27T20:23:55Z")

</div>

Dafür wird es ein Update geben. Aber das debug hat in Produktivsystemen nichts zu suchen, daher ist das kein Problem, was irgendwie kritisch ist.

&nbsp;

---

<div class="post-metadata">

**Author:** ![im3](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@im3](https://forum.shopware.com/u/im3)\
**Post date:** [27. Februar 2019 um 20:29 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/16 "2019-02-27T20:29:10Z")

</div>

> [@Moritz Naczenski schrieb:](https://forum.shopware.com/profile/14574/Moritz%20Naczenski "Moritz%20Naczenski")
> 
> ja, genau.

getan. funktioniert. Danke.&nbsp;

---

<div class="post-metadata">

**Author:** ![ITSchweitzer](https://avatars.discourse-cdn.com/v4/letter/i/f14d63/32.png) [@ITSchweitzer](https://forum.shopware.com/u/ITSchweitzer)\
**Post date:** [28. Februar 2019 um 14:19 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/17 "2019-02-28T14:19:36Z")

</div>

Kann man das auch korrekt mit der zuerst vorgeschlagenen Lösung fixen?

In unserer config.php ist zum httpCache nichts enthalten.

---

<div class="post-metadata">

**Author:** ![khartmann](https://avatars.discourse-cdn.com/v4/letter/k/d6d6ee/32.png) [@khartmann](https://forum.shopware.com/u/khartmann)\
**Post date:** [5. März 2019 um 08:56 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/18 "2019-03-05T08:56:58Z")

</div>

> [@ITSchweitzer schrieb:](https://forum.shopware.com/profile/26003/ITSchweitzer "ITSchweitzer")
> 
> Kann man das auch korrekt mit der zuerst vorgeschlagenen Lösung fixen?
> 
> In unserer config.php ist zum httpCache nichts enthalten.

Bei uns ist ebenfalls nichts in der config.php enthalten. Wir nutzen aktuell die 5.5.3.

---

<div class="post-metadata">

**Author:** ![ITSchweitzer](https://avatars.discourse-cdn.com/v4/letter/i/f14d63/32.png) [@ITSchweitzer](https://forum.shopware.com/u/ITSchweitzer)\
**Post date:** [6. März 2019 um 19:51 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/19 "2019-03-06T19:51:45Z")

</div>

Nochmal eine Antwort hier von den Experten wäre sehr nett…

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [6. März 2019 um 20:54 UTC](https://forum.shopware.com/t/fatal-error-uncaught-runtimeexception-could-not-write-cachekey/58249/20 "2019-03-06T20:54:24Z")

</div>

Der gleiche Fix ist auch mittlerweile im Core&nbsp;[SW-23612 - SW-23605 | HttpCache beim ersten Aufruf fehlerhaft / Could… · shopware/shopware@73244cd · GitHub](https://github.com/shopware/shopware/commit/73244cd264de942e613fe07d9d982f2d8d64e9aa)
