# \[Solved\] Datenbank Fehler: Connection Refused ...

**URL:** https://forum.shopware.com/t/solved-datenbank-fehler-connection-refused/43493
**Category:** Allgemein
**Created:** [7. Februar 2017 um 17:37 UTC](https://forum.shopware.com/t/solved-datenbank-fehler-connection-refused/43493 "2017-02-07T17:37:39Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![aphi](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@aphi](https://forum.shopware.com/u/aphi)
#### Post date: [7. Februar 2017 um 17:37 UTC](https://forum.shopware.com/t/solved-datenbank-fehler-connection-refused/43493/1 "2017-02-07T17:37:39Z")

</div>

Seit neuestem stürzt die datenbank immer wieder ab und im Error Log steht folgender Stacktrace:

&nbsp;

```
[Tue Feb 07 07:34:29.000167 2017] [:error] [pid 9244] [client 89.15.68.252:60421] PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Could not connect to database. Message from SQL Server: SQLSTATE[HY000] [2002] Connection refused' in /home/aphi/shopware-5.2.12-0/apps/shopware/htdocs/engine/Shopware/Components/DependencyInjection/Bridge/Db.php:71\nStack trace:\n#0 /home/aphi/shopware-5.2.12-0/apps/shopware/htdocs/engine/Shopware/Kernel.php(268): Shopware\\Components\\DependencyInjection\\Bridge\\Db::createPDO(Array)\n#1 /home/aphi/shopware-5.2.12-0/apps/shopware/htdocs/engine/Shopware/Components/HttpCache/AppCache.php(249): Shopware\\Kernel->boot()\n#2 /home/aphi/shopware-5.2.12-0/apps/shopware/htdocs/vendor/symfony/http-kernel/HttpCache/HttpCache.php(258): Shopware\\Components\\HttpCache\\AppCache->forward(Object(Symfony\\Component\\HttpFoundation\\Request), true)\n#3 /home/aphi/shopware-5.2.12-0/apps/shopware/htdocs/engine/Shopware/Components/HttpCache/AppCache.php(103): Symfony\\Component\\HttpKernel\\HttpCache\\HttpCache->pass(Object(Symfony\\Component\\HttpFoundation\\Request), true)\n#4 /home/aphi/shopware in /home/aphi/shopware-5.2.12-0/apps/shopware/htdocs/engine/Shopware/Components/DependencyInjection/Bridge/Db.php on line 71

```

&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: [7. Februar 2017 um 18:12 UTC](https://forum.shopware.com/t/solved-datenbank-fehler-connection-refused/43493/2 "2017-02-07T18:12:15Z")

</div>

Da muss dein Hoster helfen, denn da steht ja nur, dass die Datenbank nicht erreichbar ist.  
Warum kann man nur über die Datenbank direkt rausbekommen.

---

<div class="post-metadata">

### Author: ![aphi](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@aphi](https://forum.shopware.com/u/aphi)
#### Post date: [7. Februar 2017 um 18:22 UTC](https://forum.shopware.com/t/solved-datenbank-fehler-connection-refused/43493/3 "2017-02-07T18:22:38Z")

</div>

Im Datenbank log steht nur immer&nbsp;

```
2017-02-07 18:31:34 22917 [Note] /home/aphi/shopware-5.2.12-0/mysql/bin/mysqld.bin: ready for connections.
Version: '5.6.34' socket: '/home/aphi/shopware-5.2.12-0/mysql/tmp/mysql.sock' port: 3306 MySQL Community Server (GPL)
Killed

```

Killed? Was kann das sein?

PS: Ich hoste den Server selber.

---

<div class="post-metadata">

### Author: ![nabjoern](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/nabjoern/32/18847_2.png) [@nabjoern](https://forum.shopware.com/u/nabjoern)
#### Post date: [9. August 2017 um 21:25 UTC](https://forum.shopware.com/t/solved-datenbank-fehler-connection-refused/43493/4 "2017-08-09T21:25:03Z")

</div>

Hallo aphi,

kannst du berichten woran es lag?

Beste Grüße

Björn

---

<div class="post-metadata">

### Author: ![aphi](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@aphi](https://forum.shopware.com/u/aphi)
#### Post date: [16. November 2017 um 13:14 UTC](https://forum.shopware.com/t/solved-datenbank-fehler-connection-refused/43493/5 "2017-11-16T13:14:20Z")

</div>

Ich habe immer noch keine Ahnung woran das lag, es hat einfach aufgehört.

---

<div class="post-metadata">

### Author: ![TimmeHosting](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/timmehosting/32/15580_2.png) [@TimmeHosting](https://forum.shopware.com/u/TimmeHosting)
#### Post date: [18. November 2017 um 13:20 UTC](https://forum.shopware.com/t/solved-datenbank-fehler-connection-refused/43493/6 "2017-11-18T13:20:57Z")

</div>

Hast Du ein Monitoring wie z.B. munin auf dem Server? Dann könntest Du herausfinden, ob z.B. zu wenig RAM vorhanden ist, was die Funktionsfähigkeit des MySQL-Servers beeinträchtigen würde. Außerdem solltest Du mal im MySQL-Error-log nach Fehlern Ausschau halten.

![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/385eaa628505df573ebf33722f780335f53ac1b2.png)

Timme Hosting - schnelles nginx-Hosting

[www.timmehosting.de](https://timmehosting.de/)
