Skip to content

FrankenPHP + Postgres: no connection to the server #438

@darkweak

Description

@darkweak

Hello,
I experiencing some stuff using FrankenPHP but I'm facing an issue that causes Symfony throw a critical error.

Stack:

  • API Platform base
  • Postgresql (tried with 15 and 14)
  • FrankenPHP
  • Swarm cluster (docker container based on alpine)
{
    "channel": "request",
    "context": {
        "exception": {
            "class": "Doctrine\\DBAL\\Exception\\DriverException",
            "code": 7,
            "file": "/app/vendor/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php:87",
            "message": "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 7 no connection to the server",
            "previous": {
                "class": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
                "code": 7,
                "file": "/app/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:28",
                "message": "SQLSTATE[HY000]: General error: 7 no connection to the server",
                "previous": {
                    "class": "PDOException",
                    "code": 0,
                    "file": "/app/vendor/doctrine/dbal/src/Driver/PDO/Statement.php:130",
                    "message": "SQLSTATE[HY000]: General error: 7 no connection to the server"
                }
            }
        }
    },
    "datetime": "2023-12-24T12:46:50.768750+00:00",
    "extra": {},
    "level": 500,
    "level_name": "CRITICAL",
    "message": "Uncaught PHP Exception Doctrine\\DBAL\\Exception\\DriverException: \"An exception occurred while executing a query: SQLSTATE[HY000]: General error: 7 no connection to the server\" at /app/vendor/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php line 87"
}

The error is thrown after about 10-15 minutes running.
Using directly caddy without FrankenPHP works well but I can't explain it because if I go on the container and type bin/console do:q:sql "SELECT * FROM table" it gets the results from db without any issues.
Any ideas about that ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy