Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nats: account requires a stream config to have max bytes set #3417

Open
matrixbot opened this issue Nov 2, 2024 · 1 comment
Open

nats: account requires a stream config to have max bytes set #3417

matrixbot opened this issue Nov 2, 2024 · 1 comment

Comments

@matrixbot
Copy link
Collaborator

This issue was originally created by @paigeadelethompson at matrix-org/dendrite#3417.

This is an issue that came up while trying to use a SaaS NATS provider:

time="2024-09-10T14:40:05.105105731Z" level=fatal msg="Unable to add in-memory stream" error="nats: account requires a stream config to have max bytes set" stream=DendriteInputRoomEvent subjects="[DendriteInputRoomEvent DendriteInputRoomEvent.>]"

I believe it refers to the StreamConfig specified in:

https://github.com/matrix-org/dendrite/blob/main/setup/jetstream/streams.go#L48

Also something else that I'm noticing about the StreamConfig is that a few of them explicitly indicate memory for the storage type:

{
Name:      OutputTypingEvent,
Retention: nats.InterestPolicy,
Storage:   nats.MemoryStorage,
MaxAge:    time.Second * 60,
},

which would also afaik be a problem for the SaaS provider wile using the free tier

@matrixbot
Copy link
Collaborator Author

This comment was originally posted by @paigeadelethompson at matrix-org/dendrite#3417 (comment).

I've started testing this by simply adding MaxBytes: 1048576 to all of the streams, however the SaaS provider I found only gives me 10 streams at the moment and I Need 12 to test this properly. I've reached out to them to ask if they wouldn't mind allocating 2 more. I also set OutputTypingEvent to use nats.FileStorage until somebody has a better suggestion for what to do with that given that the provider doesn't allow memory storage for the service tier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant