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

Issue with postgres store #2151

Closed
hurricanehrndz opened this issue Jun 19, 2024 · 3 comments · Fixed by #2261
Closed

Issue with postgres store #2151

hurricanehrndz opened this issue Jun 19, 2024 · 3 comments · Fixed by #2261

Comments

@hurricanehrndz
Copy link
Contributor

Describe the problem

A clear and concise description of what the problem is.

management/server/http/middleware/auth_middleware.go:88: Error when validating JWT claims: extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters;

Believe this related to a Postgres limit:
https://klotzandrew.com/blog/postgres-passing-65535-parameter-limit/

To Reproduce

Unknown

Expected behavior

For 65535 limit not to be reached

Are you using NetBird Cloud?

No

NetBird version

0.27.10

@mlsmaycon
Copy link
Collaborator

Hello @hurricanehrndz thanks for reporting the issue. To understand better what is causing the system to reach this limit.
Can you share the following about your local setup and the issue?

  • is this happening with all users?
  • how many users and groups you have in the system?
  • Do you have JWT groups enabled and how many of them are there for the users with this error?

Happy to discuss the details on slack too.

@hurricanehrndz
Copy link
Contributor Author

hurricanehrndz commented Jun 19, 2024

Hello @hurricanehrndz thanks for reporting the issue. To understand better what is causing the system to reach this limit. Can you share the following about your local setup and the issue?

  • is this happening with all users?

We only tested with two users

  • how many users and groups you have in the system?

maybe 20 - 50 groups, stress testing with about 2200 dummy accounts

  • Do you have JWT groups enabled and how many of them are there for the users with this error?

yes, each user would have at most 3 groups

Happy to discuss the details on slack too.

We tested this with another instance with less users and this error doesn't occur

@hurricanehrndz
Copy link
Contributor Author

hurricanehrndz commented Jun 19, 2024

Some more logs

2024-06-19T01:56:16Z DEBG management/server/sql_store.go:188: took 273 ms to persist an account to the store
2024-06-19T01:56:16Z ERRO management/server/http/middleware/auth_middleware.go:88: Error when validating JWT claims: extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters; extended protocol limited to 65535 parameters
2024-06-19T01:56:16Z ERRO management/server/http/util/util.go:80: got a handler error: token invalid
2024-06-19T01:56:16Z ERRO management/server/telemetry/http_api_metrics.go:181: HTTP response 2515859429: GET /api/users status 401
2024-06-19T01:56:16Z DEBG management/server/telemetry/http_api_metrics.go:201: request GET /api/users took 520 ms and finished with status 401

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

Successfully merging a pull request may close this issue.

2 participants