MagicStack / MagicStack/asyncpg
connection.close is throwing protocol error
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 8.1k
- Forks
- 468
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
asyncpg version: 0.18.1
PostgreSQL version: 9.5.10
Do you use a PostgreSQL SaaS? If so, which? Can you reproduce
the issue with a local PostgreSQL install?: using google cloud sql pg instance
Python version: 3.6.5
Platform: Ubuntu
Do you use pgbouncer?: No
Did you install asyncpg with pip?: Yes
If you built asyncpg locally, which version of Cython did you use?:
Can the issue be reproduced under both asyncio and
uvloop?: No
I have been facing this error for quite sometime intermittently asyncpg.exceptions._base.InternalClientError: got result for unknown protocol state 0
The entire stack trace:
File "/repo/server/schema_db.py", line 345, in read
await connection.close()
File "/usr/local/lib/python3.6/dist-packages/asyncpg/connection.py", line 1082, in close
await self._protocol.close(timeout)
File "asyncpg/protocol/protocol.pyx", line 560, in close
File "asyncpg/protocol/protocol.pyx", line 814, in asyncpg.protocol.protocol.BaseProtocol._dispatch_result
asyncpg.exceptions._base.InternalClientError: got result for unknown protocol state 0
Can someone explain when this exception is thrown and for what reason?
If i know the reason this exception is thrown, i can figure out the issue myself.
I'm not able to reproduce locally or in my stage environment.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem fehlschlagenden await connection.close() in schema_db.py:345, untersuche anschließend asyncpg/protocol/protocol.pyx bei close und BaseProtocol._dispatch_result und verwende dabei den gemeldeten Stacktrace und die Versionsdetails. Bestimme die intermittierenden Bedingungen, die mit der Google Cloud SQL PostgreSQL-Instanz den unbekannten Protokollzustand erzeugen; das Issue ist abgeschlossen, wenn die Ursache und ein zuverlässiger Reproduktions- oder Verifizierungsweg festgestellt sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- postgresql, python
- Bereich
- databases
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 30/100