Skip to content
This repository was archived by the owner on Sep 13, 2024. It is now read-only.
This repository was archived by the owner on Sep 13, 2024. It is now read-only.

100% CPU usage when using httpx #117

Description

@haael

Describe the bug

When doing (several) requests with httpx, the CPU usage goes beyond 100%, possibly proportional to the number of parallel requests. After the last request is finished, CPU usage remains at 100%. The requests are successful otherwise and the data gets delivered.

The problem does not occur when using httpx outside gbulb.

Steps to reproduce

import httpx
def main(url):
    client = httpx.AsyncClient()
    result = await client.get(url)
    print(result.content)
    await client.aclose()

Expected behavior

CPU usage at 0% when idle.

Screenshots

No response

Environment

Ubuntu, Python 3.11

Logs


Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA crash or error in behavior.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions