Summary
After several integration test runs, BTCPayServer startup begins failing with:
SqlState 53100: could not resize shared memory segment ... No space left on device
Because of this, tests time out before payjoin logic is reached.
Observed in
Example failing test:
RunTestPaymentIntegrationTests.CreateInvoiceAndPayItThroughRunTestPayment
Failure point:
PayjoinAccountTestHelper.CreateInitializedTestContextAsync()
tester.StartAsync().WaitAsync(cancellationToken)
Logs show:
- repeated migration retries
BTCPayServer.Hosting.MigrationStartupTask: Error while running migration scripts, retrying...
Npgsql.PostgresException 53100
Why investigate
It is not yet clear whether this is:
- leaked test resources / bad cleanup,
- container or PostgreSQL shared memory exhaustion,
- or something that could also matter in production.
Expected behavior
Repeated test runs should not exhaust resources or break startup.
Acceptance criteria
- identify root cause;
- determine whether this is test-only or production-relevant;
- define a reliable fix or mitigation;
- confirm repeated test runs no longer trigger the issue.
Summary
After several integration test runs, BTCPayServer startup begins failing with:
SqlState 53100: could not resize shared memory segment ... No space left on deviceBecause of this, tests time out before payjoin logic is reached.
Observed in
Example failing test:
RunTestPaymentIntegrationTests.CreateInvoiceAndPayItThroughRunTestPaymentFailure point:
PayjoinAccountTestHelper.CreateInitializedTestContextAsync()tester.StartAsync().WaitAsync(cancellationToken)Logs show:
BTCPayServer.Hosting.MigrationStartupTask: Error while running migration scripts, retrying...Npgsql.PostgresException 53100Why investigate
It is not yet clear whether this is:
Expected behavior
Repeated test runs should not exhaust resources or break startup.
Acceptance criteria