Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quaint error, but the connections are active #1041

Open
TelegramXPlus opened this issue Oct 28, 2024 · 0 comments
Open

quaint error, but the connections are active #1041

TelegramXPlus opened this issue Oct 28, 2024 · 0 comments

Comments

@TelegramXPlus
Copy link

TelegramXPlus commented Oct 28, 2024

Bug description

{
  "timestamp": "2024-10-28T16:30:22.541723Z",
  "level": "ERROR",
  "fields": {
    "message": "Error in PostgreSQL connection: Error { kind: Closed, cause: None }"
  },
  "target": "quaint::connector::postgres::native"
}

However I'm having activity before and after the error happens, hence the connection is being used. Moreover I have different services that are using the same dbms but a different db, and it looks like each one of them has had this "problem" at least once as of today. the date differs but I see a gap of 7 minutes also between two errors of the same service.

The code keep working fine, however I'm interested to know if there's a way to suppress this error or just to solve it.

How to reproduce

I'm having multiple background tasks that are connected to a websocket (each task has its own connection to the same ws but with different params).

Expected behavior

Not receiving this log message.

Prisma information

generator client {
  provider = "prisma-client-py"
  enable_experimental_decimal = true
}

datasource db {
  provider = "postgresql"
  url = env("DATABASE_URL")
}

enum Operation {
    BUY
    SELL
}

I've only included the fields I thought would be relevant.

Moreover when connecting to the db, in my main I do

prisma = Prisma(auto_register=True)
await prisma.connect()
await blocking_task
await prisma.disconnect()

And the other parts of my code use the prisma.models objects to query the db

Environment & setup

  • OS: python:3.12-slim AS builder (dockerized)
  • Database: PostgreSQL
  • Python version: python:3.12
  • Prisma version:
prisma: 5.17.0
prisma client python: 0.14.0
platform: debian-openssl-3.0.x
expected engine version: 393aa359c9ad4a4bb28630fb5613f9c281cde053
installed extras: []
install path: /app/venv/lib/python3.12/site-packages/prisma
binary cache dir: /root/.cache/prisma-python/binaries/5.17.0/393aa359c9ad4a4bb28630fb5613f9c281cde053
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant