Issue with postgres store #988

Closed
opened 2025-11-20 05:21:09 -05:00 by saavagebueno · 3 comments
Owner

Originally created by @hurricanehrndz on GitHub (Jun 18, 2024).

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

Originally created by @hurricanehrndz on GitHub (Jun 18, 2024). **Describe the problem** A clear and concise description of what the problem is. ```log 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
saavagebueno added the triage-needed label 2025-11-20 05:21:09 -05:00
Author
Owner

@mlsmaycon commented on GitHub (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?
  • 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.

@mlsmaycon commented on GitHub (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? * 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.
Author
Owner

@hurricanehrndz commented on GitHub (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 commented on GitHub (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
Author
Owner

@hurricanehrndz commented on GitHub (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
@hurricanehrndz commented on GitHub (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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#988