MagicStack / asyncpg

A fast PostgreSQL Database Client Library for Python/asyncio.
Apache License 2.0
6.88k stars 399 forks source link

PgStac no longer works with Azure Flexible Postgres server #1102

Closed martys closed 10 months ago

martys commented 10 months ago

A few days ago Microsoft has bumped up a minor version of a "Azure Database for PostgreSQL flexible server" to version 13.12 from 13.11

After that - all PGstac methods using that are utilized by Stac-Fast-Api stopped working ! resulting in a "segmentation fault" and not returning any data back.

Executing the same queries or stored procedures using a PGAdmin works fine, indicating a problem with pgstab library

We are in the middle of production outage right now due to this, and will add more details as they become available.

After deeper investigation we see that the issue is coming from asyncpg library

packages/asyncpg/connection.py", line 1366, in reset
    await self.execute(reset_query, timeout=timeout)
  File "/home/mantasmantas/projects/Atlas-Platform/app/atlas_ui/stac_fastapi/venv/lib/python3.10/site-packages/asyncpg/connection.py", line 317, in execute
    return await self._protocol.query(query, timeout)
  File "asyncpg/protocol/protocol.pyx", line 338, in query
asyncpg.exceptions.ConnectionDoesNotExistError: connection was closed in the middle of operation