Mautic Community Forums

Database connection error (code #7)

We can connect to the database through pgadmin, ping it through ssh, connect to ftp, website works fine etc just mautic can’t communicate with the database.



PHP 5.5.9

Ubuntu SErver 14.04.1

Apache 2.4.7

Mautic 1.2.3

PostGreSQL 9.3.10



The logs only show a failure to communicate with IMAP (for monitored bounce box). You will also see that we tried updating mautic after we started getting the error:



Exception SymfonyComponentHttpKernelExceptionNotFoundHttpException: “Requested URL not found: /mautic/media/images/” at /var/www/mautic/app/bundles/CoreBundle/Controller/CommonController.php line 352 {“exception”:"[object] (Symfony\Component\HttpKernel\Exception\NotFoundHttpException(code: 0): Requested URL not found: /mautic/media/images/ at /var/www/mautic/app/bundles/CoreBundle/Controller/CommonController.php:352)"} []

[2016-02-02 07:31:20] mautic.ERROR: Uncaught PHP Exception SymfonyComponentHttpKernelExceptionNotFoundHttpException: “Requested URL not found: /mautic/media/images/” at /var/www/mautic/app/bundles/CoreBundle/Controller/CommonController.php line 352 {“exception”:"[object] (Symfony\Component\HttpKernel\Exception\NotFoundHttpException(code: 0): Requested URL not found: /mautic/media/images/ at /var/www/mautic/app/bundles/CoreBundle/Controller/CommonController.php:352)"} []

[2016-02-02 14:25:18] mautic.NOTICE: PHP Notice: Unknown: [CLOSED] IMAP connection broken (server response) (errflg=2) - in file Unknown - at line 0 [] []

[2016-02-02 14:25:18] mautic.NOTICE: PHP Notice: Unknown: [CLOSED] IMAP connection broken (server response) (errflg=2) - in file Unknown - at line 0 [] []

[2016-02-02 14:38:18] mautic.NOTICE: PHP Notice: Unknown: [CLOSED] IMAP connection broken (server response) (errflg=2) - in file Unknown - at line 0 [] []

[2016-02-02 14:38:18] mautic.NOTICE: PHP Notice: Unknown: [CLOSED] IMAP connection broken (server response) (errflg=2) - in file Unknown - at line 0 [] []

[2016-02-02 14:55:35] mautic.NOTICE: PHP Notice: Unknown: [CLOSED] IMAP connection broken (server response) (errflg=2) - in file Unknown - at line 0 [] []

[2016-02-02 14:55:35] mautic.NOTICE: PHP Notice: Unknown: [CLOSED] IMAP connection broken (server response) (errflg=2) - in file Unknown - at line 0 [] []

[2016-02-02 18:36:27] mautic.WARNING: Command mautic:update:apply exited with status code 7 [] []

[2016-02-02 18:36:27] mautic.ERROR: PDOException: SQLSTATE[08006] [7] timeout expired (uncaught exception) at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php line 40 while running console command mautic:update:apply [] []

[2016-02-02 18:39:11] mautic.WARNING: Command mautic:update:apply exited with status code 1 [] []

[2016-02-02 18:40:37] mautic.WARNING: Command mautic:update:apply exited with status code 1 [] []

We can connect to the database through pgadmin, ping it through ssh, connect to ftp, website works fine etc just mautic can’t communicate with the database.

PHP 5.5.9
Ubuntu SErver 14.04.1
Apache 2.4.7
Mautic 1.2.3
PostGreSQL 9.3.10

The logs only show a failure to communicate with IMAP (for monitored bounce box). You will also see that we tried updating mautic after we started getting the error:

Exception SymfonyComponentHttpKernelExceptionNotFoundHttpException: “Requested URL not found: /mautic/media/images/” at /var/www/mautic/app/bundles/CoreBundle/Controller/CommonController.php line 352 {“exception”:"[object] (Symfony\Component\HttpKernel\Exception\NotFoundHttpException(code: 0): Requested URL not found: /mautic/media/images/ at /var/www/mautic/app/bundles/CoreBundle/Controller/CommonController.php:352)"} []
[2016-02-02 07:31:20] mautic.ERROR: Uncaught PHP Exception SymfonyComponentHttpKernelExceptionNotFoundHttpException: “Requested URL not found: /mautic/media/images/” at /var/www/mautic/app/bundles/CoreBundle/Controller/CommonController.php line 352 {“exception”:"[object] (Symfony\Component\HttpKernel\Exception\NotFoundHttpException(code: 0): Requested URL not found: /mautic/media/images/ at /var/www/mautic/app/bundles/CoreBundle/Controller/CommonController.php:352)"} []
[2016-02-02 14:25:18] mautic.NOTICE: PHP Notice: Unknown: [CLOSED] IMAP connection broken (server response) (errflg=2) - in file Unknown - at line 0 [] []
[2016-02-02 14:25:18] mautic.NOTICE: PHP Notice: Unknown: [CLOSED] IMAP connection broken (server response) (errflg=2) - in file Unknown - at line 0 [] []
[2016-02-02 14:38:18] mautic.NOTICE: PHP Notice: Unknown: [CLOSED] IMAP connection broken (server response) (errflg=2) - in file Unknown - at line 0 [] []
[2016-02-02 14:38:18] mautic.NOTICE: PHP Notice: Unknown: [CLOSED] IMAP connection broken (server response) (errflg=2) - in file Unknown - at line 0 [] []
[2016-02-02 14:55:35] mautic.NOTICE: PHP Notice: Unknown: [CLOSED] IMAP connection broken (server response) (errflg=2) - in file Unknown - at line 0 [] []
[2016-02-02 14:55:35] mautic.NOTICE: PHP Notice: Unknown: [CLOSED] IMAP connection broken (server response) (errflg=2) - in file Unknown - at line 0 [] []
[2016-02-02 18:36:27] mautic.WARNING: Command mautic:update:apply exited with status code 7 [] []
[2016-02-02 18:36:27] mautic.ERROR: PDOException: SQLSTATE[08006] [7] timeout expired (uncaught exception) at /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php line 40 while running console command mautic:update:apply [] []
[2016-02-02 18:39:11] mautic.WARNING: Command mautic:update:apply exited with status code 1 [] []
[2016-02-02 18:40:37] mautic.WARNING: Command mautic:update:apply exited with status code 1 [] []