-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Internal subscription on "$JS.API.CONSUMER.CREATE.mystream" took too long: #5534
Comments
what is the stream info of the stream? |
@wallyqs 👋
|
Can you please provide some information about the hardware you are running on? Are you creating/deleting consumers at a high rate? |
By the way, I do not know why it shows Stat
Short info about configuration for the nats server:
Yes, when I run my system, there are thousands of consumers trying to connect to the server at the same time(the server holds 1 connection to nats, and creates subscriptions for the clients) |
How are you creating the consumers? Do your clients re-bind to existing named consumers to pick up where they left off, or are they creating new consumers each time they connect? (If so, you might want to set an inactive threshold to clean up old consumers when they go idle.) |
I tried to use InactiveThreshold to fix the initial problem with timeout error and However I explicitly close all subscriptions:
|
Here is how I create a consumer:
(I already wrote it above in the description) |
Hey, I got the error in my golang app:
At the same time I see in the nats-server logs:
Configuration:
I have thousands of subscriptions at the same time and I don't care if the processing time is a few seconds, in this context it's normal, I just want a guarantee that messages will be delivered even after 30 seconds without errors.
I tried different settings, even something ubnormal like this:
or added this to the nats config:
But it did't help.
Here is how I create the stream:
(By the way, FileStorage absolutely fails on the setup and crashes after a few seconds under a production load with
context deadline exceeded
)And here is how I consume the stream:
What I excpect
I expect that there is a parameter for the deadline, so that after for example 10-40 seconds the queue will be processed and all clients will receive their messages.
The text was updated successfully, but these errors were encountered: