async def get_ctti_pool(username: str, password: str) -> asyncpg.Pool:
    """Get or create the shared CTTI connection pool.

    Args:
        username: AACT database username
        password: AACT database password

    Returns:
        The shared connection pool
    """
    global _ctti_pool

    async with _ctti_pool_lock:
        if _ctti_pool is None:
            logger.info("Creating shared CTTI connection pool")
            _ctti_pool = await asyncpg.create_pool(
                host=CTTISource.AACT_HOST,
                port=CTTISource.AACT_PORT,
                user=username,
                password=password,
                database=CTTISource.AACT_DATABASE,
                min_size=2,  # Minimum connections in pool
                max_size=5,  # Reduced from 10 - AACT is a public DB with strict limits
                timeout=30.0,
                command_timeout=60.0,
            )
            logger.info("CTTI connection pool created successfully")

    return _ctti_pool
Get or create the shared CTTI connection pool.

    Args:
        username: AACT database username
        password: AACT database password

    Returns:
        The shared connection pool
    
backend/airweave/platform/sources/ctti.py