Skip to content

Jetstream Out of memory error #526

Answered by mtmk
arvindsouza asked this question in Q&A
Jun 26, 2024 · 3 comments · 6 replies
Discussion options

You must be logged in to vote

you should await the publish calls:

var ack = await jetstream.PublishAsync($"{streamName}.picture", ...);
ack.EnsureSuccess();

Edit: JetStream publish works with acknowledgments. clients send a message and wait for a confirmation from the server that it's persisted. with .NET client when you don't await (or not keep track of the returned tasks and throttle in some fashion) you can send messages way faster then they can be persisted.

I think that is what you're observing with server queuing up messages internally while waiting for disk IO. I'm not a server expert though, @neilalexander please feel free to add to it or correct me

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@arvindsouza
Comment options

Answer selected by arvindsouza
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@mtmk
Comment options

mtmk Jun 28, 2024
Maintainer

@arvindsouza
Comment options

@mtmk
Comment options

mtmk Jun 28, 2024
Maintainer

@arvindsouza
Comment options

@mtmk
Comment options

mtmk Jun 28, 2024
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants