Skip to content

Report when the member mail limit holds per instance only - #3125

Merged
pournasserian merged 2 commits into
mainfrom
3073-member-mail-limit-note
Nov 15, 2026
Merged

pournasserian merged 2 commits into
mainfrom
3073-member-mail-limit-note

Conversation

@pournasserian

Copy link
Copy Markdown
Member

Closes #3073

The limit of one member mail a minute of each slot to an address is kept in IDistributedCache, so with the default MemoryDistributedCache it holds per instance. The startup report now lists member-mail-limit-per-instance (warning 9131) in Production while an email sender is set up and the resolved cache is the in-memory one, worded as a condition: it holds per instance, and with several instances a shared IDistributedCache is needed. Spec 4.7 and 4.15 (multi-instance and startup diagnostics), docs/host-configuration.md and the production setup of docs/docker.md name the requirement, the last next to the output cache.

Decisions

  • Condition. forgot-password and resend-verification are open whether or not registration is, so the line does not ask AllowRegistration; it asks whether mail can go out at all (the sender is not the refusing default of Production). Without a sender no member mail goes, and the line would be noise.
  • Detection. The resolved IDistributedCache is checked with is MemoryDistributedCache, the same test MemberMailLimiter makes, so the report and the limiter agree. It is resolved only in Production with a sender; the default is cheap and a Redis cache connects on first use.
  • Wording, no switch. An instance cannot tell that it has peers, so the message says that one instance needs nothing. No option silences it; registering a shared cache does.
  • docker.md. Its production setup did not name the output cache, so a new "Several instances" bullet names both in-memory stores and that the image keeps them per instance; running several needs a host of your own that registers shared ones.
  • No new event id or code: the line is logged with the existing 9131.

Tests

  • StartupReportTests.TheMemberMailLimitInTheInMemoryCacheIsReportedInProductionWhileMailGoesOut: listed in Production with SMTP and the default cache; absent without a sender, with a shared cache, and in Staging.
  • Release build with -warnaserror; SDK, Core and Architecture tests; StartupReportTests; markdownlint.

@pournasserian pournasserian added type:bug Defect area:identity Users, authorization server, API keys and members labels Nov 15, 2026
@pournasserian
pournasserian enabled auto-merge (squash) November 15, 2026 14:37
@pournasserian
pournasserian merged commit 7c3fc1e into main Nov 15, 2026
14 checks passed
@pournasserian
pournasserian deleted the 3073-member-mail-limit-note branch November 15, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:identity Users, authorization server, API keys and members type:bug Defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Say when the member mail limit holds per instance only

1 participant