Skip to content

Local end-to-end runs trip the API's login throttle #1835

Open

Description

@joshunrau

A local pnpm test:e2e run had 49 of 327 tests fail, every one on a login:

  • The api-client.ts fixtures got 429 ThrottlerException: Too Many Requests from
    POST /v1/auth/login.
  • Logins through the UI were bounced back to /auth/login.

The failures began partway through the run and hit every later spec that logs in, including static
pages such as About and Contact. Re-running the same 49 tests with --workers=2, they passed. CI is
unaffected because it runs one worker.

Cause

  • testing/playwright.config.ts sets workers: process.env.CI ? 1 : undefined with
    fullyParallel: true, so a local run uses half the machine's cores.
  • Each worker logs in for its own fixtures (adminToken, roleAccount), and some specs log in
    through the UI.
  • The API that Playwright starts (apps/api's dev:test) reads the normal .env, which has
    THROTTLER_ENABLED=true. LOGIN_REQUEST_THROTTLER_LIMIT falls back to 50 logins per 60 seconds
    per IP, and every worker shares one IP.

Possible fixes

  • Raise or disable the login throttle for the dev:test API only. This keeps local runs parallel and
    changes nothing in production.
  • Or cap the number of local workers.

Activity

  1. added
    Difficulty: LowIsolated change, about 2 hours or less
    ChoreType: maintenance with no user-visible change (dependency upgrades, tooling, tests, refactors)
    Area: InfrastructureDeployment, Docker, CI, logging, CLIs, build and test tooling
    on Oct 29, 2026
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

    Area: InfrastructureDeployment, Docker, CI, logging, CLIs, build and test toolingChoreType: maintenance with no user-visible change (dependency upgrades, tooling, tests, refactors)Difficulty: LowIsolated change, about 2 hours or lessPriority: MediumReal value; schedule normally

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions