# Message from SQL Server: SQLSTATE\[HY000\]

**URL:** <https://forum.shopware.com/t/message-from-sql-server-sqlstate-hy000/87917>\
**Category:** Allgemein\
**Created:** [26. Mai 2021 um 17:39 UTC](https://forum.shopware.com/t/message-from-sql-server-sqlstate-hy000/87917 "2021-05-26T17:39:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdev](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@rdev](https://forum.shopware.com/u/rdev)\
**Post date:** [26. Mai 2021 um 17:39 UTC](https://forum.shopware.com/t/message-from-sql-server-sqlstate-hy000/87917/1 "2021-05-26T17:39:57Z")

</div>

Hallo,  
leider bekomme ich regelmäßig Fehler im meinen Logs zu sehen. Ich habe Debian mit Apache, PHP und MariaDB laufen und kann mir den Fehler hier nicht erklären.

**Apache Logs:**  
[Wed May 26 16:30:45.928037 2021] [php7:error] [pid 15778] [client xxx.xxx.xxx.112:28283] PHP Fatal error: Uncaught RuntimeException: Could not connect to database. Message from SQL Server: SQLSTATE[HY000] [2002] Connection refused in /var/www/example.com/engine/Shopware/Components/DependencyInjection/Bridge/Db.php:91\nStack trace:\n#0 /var/www/example.com/engine/Shopware/Kernel.php(236): Shopware\Components\DependencyInjection\Bridge\Db::createPDO(Array)\n#1 /var/www/example.com/engine/Shopware/Components/HttpCache/AppCache.php(255): Shopware\Kernel-\>boot()\n#2 /var/www/example.com/vendor/symfony/http-kernel/HttpCache/HttpCache.php(238): Shopware\Components\HttpCache\AppCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true)\n#3 /var/www/example.com/engine/Shopware/Components/HttpCache/AppCache.php(106): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>pass(Object(Symfony\Component\HttpFoundation\Request), true)\n#4 /var/www/example.com/shopware.php(122): Shopware\Components\HttpCache\AppCache-\>handle(Object(Symfony\Component\HttpFoundation\Request))\n#5 {main}\n thrown in /var/www/example.com/engine/Shopware/Components/DependencyInjection/Bridge/Db.php on line 91, referer: [https://example.com/ozonisiertes-kokosoel](https://example.com/ozonisiertes-kokosoel)  
[Wed May 26 16:30:46.407261 2021] [php7:error] [pid 15777] [client xxx.xxx.xxx.112:28281] PHP Fatal error: Uncaught RuntimeException: Could not connect to database. Message from SQL Server: SQLSTATE[HY000] [2002] Connection refused in /var/www/example.com/engine/Shopware/Components/DependencyInjection/Bridge/Db.php:91\nStack trace:\n#0 /var/www/example.com/engine/Shopware/Kernel.php(236): Shopware\Components\DependencyInjection\Bridge\Db::createPDO(Array)\n#1 /var/www/example.com/engine/Shopware/Components/HttpCache/AppCache.php(255): Shopware\Kernel-\>boot()\n#2 /var/www/example.com/vendor/symfony/http-kernel/HttpCache/HttpCache.php(426): Shopware\Components\HttpCache\AppCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true)\n#3 /var/www/example.com/vendor/symfony/http-kernel/HttpCache/HttpCache.php(317): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>fetch(Object(Symfony\Component\HttpFoundation\Request), true)\n#4 /var/www/example.com/engine/Shopware/Components/HttpCache/AppCache.php(188): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>lookup(Object(Symfony\Component in /var/www/example.com/engine/Shopware/Components/DependencyInjection/Bridge/Db.php on line 91, referer: [https://example.com/ozonisiertes-kokosoel](https://example.com/ozonisiertes-kokosoel)  
[Wed May 26 16:33:40.086089 2021] [core:notice] [pid 15770] AH00052: child pid 15774 exit signal Segmentation fault (11)  
[Wed May 26 16:33:40.086242 2021] [mpm\_prefork:notice] [pid 15770] AH00169: caught SIGTERM, shutting down  
[Wed May 26 16:33:40.204627 2021] [mpm\_prefork:notice] [pid 16408] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured – resuming normal operations

**MySQL Logs:**  
2021-05-26 16:33:40 242 [Warning] Aborted connection 242 to db: ‚shopware‘ user: ‚shopware‘ host: ‚localhost‘ (Got an error reading communication packets)

```
2021-05-26 16:33:40 241 [Warning] Aborted connection 241 to db: 'shopware' user: 'shopware' host: 'localhost' (Got an error reading communication packets)

```

**Konfigurationen:**

**Custom PHP Config:**  
upload\_max\_filesize = 256M  
post\_max\_size = 256M  
memory\_limit = 512M  
max\_execution\_time = 256  
max\_input\_time = 256  
opcache.max\_accelerated\_files = 100000  
opcache.memory\_consumption = 128M  
opcache.revalidate\_freq = 5  
opcache.fast\_shutdown = 1  
opcache.save\_comments = 1  
opcache.validate\_root = 1  
#cgi.fix\_pathinfo = 0

**Custom MySQL Config:**

```
[mysqld]
group_concat_max_len=2048
innodb_buffer_pool_size=5G
query_cache_size=200M
max_allowed_packet=5G
```
