async def _connect(self) -> None:
        """Establish database connection with timeout and error handling."""
        if not self.conn:
            try:
                # Convert localhost to 127.0.0.1 to avoid DNS resolution issues
                host = (
                    "127.0.0.1"
                    if self.config["host"].lower() in ("localhost", "127.0.0.1")
                    else self.config["host"]
                )

                dsn = (
                    f"DRIVER={{ODBC Driver 17 for SQL Server}};"
                    f"SERVER={host},{self.config['port']};"
                    f"DATABASE={self.config['database']};"
                    f"UID={self.config['user']};"
                    f"PWD={self.config['password']};"
                    "Timeout=10;"
                )

                self.conn = await aioodbc.connect(dsn=dsn)
            except Exception as e:
                raise ValueError(f"Database connection failed: {str(e)}") from e
Establish database connection with timeout and error handling.
backend/airweave/platform/sources/sql_server.py