Skip to content

PayrunTest: subsequent runs timeout after tenant deletion — possible AssemblyCache not cleared #9

@gsayer

Description

@gsayer

Summary

When I run multiple PayrunTest cycles sequentially, the first 2 runs succeed but all subsequent runs timeout with Missing results for payrun job. Restarting the backend resolves it until the pattern repeats.

Steps to reproduce

  1. Fresh backend container (v0.10.0-beta.3, SQL Server 2022, Docker on macOS arm64 → linux/amd64 emulation)
  2. PayrunTest batch-1.pt.json /bulk /cleantest (20 employees) → ✅
  3. PayrunTest batch-2.pt.json /bulk /cleantest (20 employees) → ✅
  4. PayrunTest batch-3.pt.json /bulk /cleantest (20 employees) → ❌ timeout
  5. All subsequent runs timeout regardless of batch size
  6. POST /api/admin/application/clearcache between runs does NOT fix it
  7. Restarting the backend container fixes it for 2 more runs

What I've ruled out

  • AssemblyCache: Calling /api/admin/application/clearcache between runs does not help
  • Batch size: Fails with 20, 50, or 100 employees
  • MaxParallelEmployees tuning: Tested with 2 and default (11), same result
  • SQL Server timeouts: No SQL errors in logs

What I observe

  • The payrun job stays in Process status and never reaches Complete
  • Backend logs show no explicit error for the stuck job
  • It is always the 3rd run that fails, consistently
  • Only a full container restart resolves it (not just cache clear)

Environment

  • Backend: v0.10.0-beta.3
  • PayrollConsole: v0.10.0-beta.3
  • SQL Server 2022 (Docker, linux/amd64)
  • macOS arm64 host (Rosetta emulation for all containers)
  • Each test creates a fresh tenant with regulation, employees, cases, and payrun

Question

Is there a known limitation with running multiple PayrunTest /cleantest cycles in sequence? Could there be an internal state (beyond AssemblyCache) that accumulates and isn't fully reset when a tenant is deleted?

I'm using PayrunTest for batch payroll validation (~1000 employees split into groups). The first 200 employees always validate correctly (99.5% conformity), but I cannot complete the remaining batches without container restarts.

Thank you for any guidance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions