You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem in the production for reason. There is an issue almost like this issue#57 one. When occur any issue like passing wrong column name or smthg like that and after that sometimes we get closed connection and next queries fall with error Due to closed connection. As I declare my db variable final so I can fix my issue by reloading server. Now I want to check connection state before get Database instance and decide to whether reinitiate connection or not.
void main() async {
final db = Database(
''' ); await db.open(); print('isClosed: ${db.connection().isClosed}');}
Just for Notice
My postgres is running in a different Docker container and my server is running in a different one. When any error occurs on the postgres site, its docker restarts and my server loses connection. How I can check state and reinitiate connection? I am open for any solution
I have a problem in the production for reason. There is an issue almost like this issue#57 one. When occur any issue like passing wrong column name or smthg like that and after that sometimes we get closed connection and next queries fall with error Due to closed connection. As I declare my db variable final so I can fix my issue by reloading server. Now I want to check connection state before get Database instance and decide to whether reinitiate connection or not.
Just for Notice
My postgres is running in a different Docker container and my server is running in a different one. When any error occurs on the postgres site, its docker restarts and my server loses connection. How I can check state and reinitiate connection? I am open for any solution
postgress_db: container_name: "rohtj_db" image: postgres:16 restart: always volumes: - ./rohtj_db/data:/var/lib/postgresql/data environment: POSTGRES_DB: rohtjdb POSTGRES_USER: rohtjdbuser POSTGRES_PASSWORD: ------ PGDATA: /var/lib/postgresql/data/pgdata ports: - 5434:5432 expose: - 5434 networks: - rohtj-backend
The text was updated successfully, but these errors were encountered: