-
Notifications
You must be signed in to change notification settings - Fork 0
RabbitMQ connection reset due to missed heartbeats during high-load E2E tests #151
Copy link
Copy link
Open
Labels
bugfixingFixing defects or unexpected behavior in existing codeFixing defects or unexpected behavior in existing codesmartem-backendCore backend services, messaging, and persistence layerCore backend services, messaging, and persistence layersmartem-backend:apiREST API endpoints and HTTP interface changesREST API endpoints and HTTP interface changessmartem-devtools:e2e-testEnd-to-end testing infrastructure and scenariosEnd-to-end testing infrastructure and scenariostestingWriting, updating, or fixing automated testsWriting, updating, or fixing automated tests
Metadata
Metadata
Assignees
Labels
bugfixingFixing defects or unexpected behavior in existing codeFixing defects or unexpected behavior in existing codesmartem-backendCore backend services, messaging, and persistence layerCore backend services, messaging, and persistence layersmartem-backend:apiREST API endpoints and HTTP interface changesREST API endpoints and HTTP interface changessmartem-devtools:e2e-testEnd-to-end testing infrastructure and scenariosEnd-to-end testing infrastructure and scenariostestingWriting, updating, or fixing automated testsWriting, updating, or fixing automated tests
Problem
During E2E test runs with high-speed playback (45.6x compression), the RabbitMQ connection is reset after ~3 minutes due to missed heartbeats.
Root Cause
RabbitMQ server closes the connection after not receiving heartbeats for 60 seconds. The API server's main thread becomes too busy processing rapid requests to service the pika heartbeat mechanism.
Evidence
From RabbitMQ logs:
From API logs:
Impact
grid.createdeventsProposed Fix Options
BlockingConnectionwith threaded heartbeat processingAffected Component
smartem_backend- RabbitMQ event publisherReproduction
Run E2E test with compressed playback:
The issue manifests after ~3 minutes of sustained high-throughput ingestion.