Skip to content

Gidgethub router created on each request, which leads to OOM issues #73

@joshuadavidthomas

Description

@joshuadavidthomas

Upstream creates the gidgethub routing on each request, which leads to a cascading situation as found via Memray:

Screenshot 2025-05-01 at 12 15 09 PM

This was causing memory consumption to grow out of control until the process was restarted via max_requests or OOM:

Screenshot 2025-05-01 at 11 16 10 AM

Only instantiate the router once, on init should fix it.

Originally posted by @ewdurbin in psf/clabot#10

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions