-
-
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
Readloop processing time when using authorization #5255
Comments
Hi @orchestd will check, but just to confirm that you only saw this in v2.9.X series? |
Hi. 2.9.16 was the version we're using, changing the version to 2.9.21 was just "in case" the specific version we chose was buggy, we can try a diff one . BTW, we have reconstructed the issue in a more vanilla manner
then we ran the same without auth - all was ok code:
|
Update:
to
"solved" the issue, but now its a risk of false authorization window |
Any ideas on how can I avoid the Readloop processing time issue without setting authorization timeout to a large number which is a security risk ? |
Can you share the complete server config file that accompanies the test that shows the issue? |
The COMPLETE configuration is on the first post (nothing fancy needed on config - its the bare minimum) reposting here:
|
So I used your config file and your program and ran it in parallel 100 times with no issues. So we must be doing something different. So I am running a v2.10.15 server with the config above and the program (changed the user/pass). So could you show exactly what command you used to run the program and the exact program code used? |
We run As for the code, we have various services, including WS frontend most of the x.y.z.a IP addresses are go backends using this lib to connect to nats
Hope this sheds more light |
Just a hint that would simplify the code a lot: Otherwise I feel it's easy to spawn a lot of new connections. |
Observed behavior
A server running only few hundreds of connections (centos 9, 2 CPUs, 4GB RAM running on GCP), is working fine with this config:
When we add an auth section with 9 users, like so:
2 sec after starting the service we are getting
after a minute or so, it goes up
also, nats is taking almost 100% CPU, clients are disconnecting
We have upgraded the server (4 CPUs 16G RAM) and it did not solve the issue (although looks like
Readloop processing time
was less than 10 sec)Removed the auth section - and all is back to normal.
Expected behavior
The server should run with no error, clients should connect easily
Server and client version
We tried both version (which worked before for months):
2.9.16
and
2.9.21
Host environment
Originally we used (for months)
GCP VM, running Centos 7.0 2 CPUs, 4GB RAM
When it failed, we moved to
GCP VM, running Centos 9.0 2 CPUs, 4GB RAM
When it failed, we upgraded to
GCP VM, running Centos 9.0 4 CPUs, 16GB RAM
None worked...
Steps to reproduce
No response
The text was updated successfully, but these errors were encountered: