[Python] psycopg_pool.ConnectionPool conninfo WARNING error connecting in 'pool-1': [Errno -2]...

Discussão em 'Python' iniciado por Stack, Março 18, 2025.

  1. Stack

    Stack Membro Participativo

    with ConnectionPool(
    conninfo = app.config["POSTGRESQL_DATABASE_URI"],
    max_size = app.config["DB_MAX_CONNECTIONS"],
    kwargs = connection_kwargs,
    ) as pool:


    With a connection string of postgresql://username:password@ipaddress:5432/database, I get the error:

    WARNING error connecting in 'pool-1': [Errno -2] Name or service not known


    I can connect to it from psql CLI with exactly the same parameters without any problem. Note that the password contains special characters such as @ and $

    Continue reading...

Compartilhe esta Página