{"record":{"id":"e285a49570a7e5c2","repo":"ruvnet/RuView","slug":"postgresql-connection-test-failed-e","errorCode":null,"errorMessage":"PostgreSQL connection test failed: {e}","messagePattern":"PostgreSQL connection test failed: (.+?)","errorType":"exception","errorClass":"DatabaseConnectionError","httpStatus":null,"severity":"error","filePath":"archive/v1/src/database/connection.py","lineNumber":287,"sourceCode":"        def receive_checkin(dbapi_connection, connection_record):\n            \"\"\"Log connection checkin.\"\"\"\n            logger.debug(\"Database connection checked in\")\n        \n        @event.listens_for(self._sync_engine, \"invalidate\")\n        def receive_invalidate(dbapi_connection, connection_record, exception):\n            \"\"\"Handle connection invalidation.\"\"\"\n            logger.warning(f\"Database connection invalidated: {exception}\")\n    \n    async def _test_postgresql_connection(self):\n        \"\"\"Test PostgreSQL connection.\"\"\"\n        try:\n            async with self._async_engine.begin() as conn:\n                result = await conn.execute(text(\"SELECT 1\"))\n                result.fetchone()  # Don't await this - fetchone() is not async\n            logger.debug(\"PostgreSQL connection test successful\")\n        except Exception as e:\n            logger.error(f\"PostgreSQL connection test failed: {e}\")\n            raise DatabaseConnectionError(f\"PostgreSQL connection test failed: {e}\")\n    \n    async def _test_redis_connection(self):\n        \"\"\"Test Redis connection.\"\"\"\n        if not self._redis_client:\n            return\n        \n        try:\n            await self._redis_client.ping()\n            logger.debug(\"Redis connection test successful\")\n        except Exception as e:\n            logger.error(f\"Redis connection test failed: {e}\")\n            if self.settings.redis_required:\n                raise DatabaseConnectionError(f\"Redis connection test failed: {e}\")\n    \n    @asynccontextmanager\n    async def get_async_session(self) -> AsyncGenerator[AsyncSession, None]:\n        \"\"\"Get async database session.\"\"\"\n        if not self._initialized:","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/ruvnet/RuView/blob/4685618388a5e49fad5b3005806f3bdd6a7c25c3/archive/v1/src/database/connection.py#L269-L305","documentation":"Error \"PostgreSQL connection test failed: {e}\" thrown in ruvnet/RuView.","triggerScenarios":"Thrown at archive/v1/src/database/connection.py:287 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4685618388a5e49fad5b3005806f3bdd6a7c25c3","analyzedAt":"2026-08-16T06:09:40.886Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}