Skip to content

Overnight soak test

import { Steps, Aside } from ‘@astrojs/starlight/components’;

Problem: Some failures only appear after hours under load — memory leaks, connection pool exhaustion, log file rotation failures, slow garbage-collection pressure. A 10-minute load test will never find these. A soak test holds moderate load for 8–24 hours and looks for drift in key metrics over time.

Test type: Soak / endurance test.

  • A MaxoPerf account with a test that has passed a standard load test at the target VU/RPS level.
  • Awareness that the test will consume runner quota for the full duration — verify your plan limits before starting.
execution:
- scenario: api-soak
concurrency: 50 # moderate — 50 % of your peak
ramp-up: 5m
hold-for: 8h # the soak window
throughput: 100 # optional: cap RPS for predictability
scenarios:
api-soak:
requests:
- label: GET /api/health
url: https://api.example.com/api/health
method: GET
- label: GET /api/products
url: https://api.example.com/api/products
method: GET
headers:
Authorization: Bearer ${API_TOKEN}
- label: POST /api/sessions
url: https://api.example.com/api/sessions
method: POST
headers:
Content-Type: application/json
Authorization: Bearer ${API_TOKEN}
body: '{"user_id": "u-soak-01"}'

Keep soak test scenarios simple — the goal is sustained pressure, not scenario coverage. A handful of representative endpoints is enough.

  1. In the MaxoPerf console, open the test and upload the YAML under Files.
  2. Bind API_TOKEN under Settings → Secrets.
  3. Under Configuration, confirm the location and VU count.

Rather than clicking Run now and staying up, schedule it:

  1. Switch to the Schedules tab.
  2. Click New schedule.
  3. Enter a cron expression for tonight — for example 0 22 * * * (10 PM every night).
  4. Pick your timezone.
  5. Name it overnight-soak and save.

See Schedule recurring tests for the full scheduling workflow.

When you open the run the next day:

  1. Open the run and go to the Overview tab.
  2. Zoom the time range to the full 8-hour window.
  3. Look at p95 latency over time — a healthy system shows a flat line. An upward trend indicates drift (memory pressure, pool exhaustion).
  4. Check error rate — any sustained error rate after the first few minutes of ramp-up is a finding.
  5. Switch to the Runners tab to verify all runners stayed healthy throughout.
  • Latency is flat or has a negligible trend over the full 8-hour window (< 5 % drift from the 1-hour mark to the 8-hour mark).
  • Error rate stays near zero after ramp-up.
  • RPS tracks the target steadily — no progressive drop that would indicate pool exhaustion starving new requests.
  • The run status is Finished.
  • 24-hour soak: extend hold-for: 24h for platforms where daily cycles (midnight jobs, log rotation, certificate renewal) are expected.
  • Recurring weekly soak: leave the cron schedule running on a weekly cadence so every release is validated against the soak profile automatically.
  • Parameterise with CSV data: supply a data entity with enough rows for the full 8-hour run so unique users cycle in — see CSV data-driven test.