Hello- I am receiving an intermittent 500 response when attempting to retrieve nested groups using the auth0 management api.
requested path:
groups/{groupId}/nested
Seemingly this error occurs at random. Occasionally, the request succeeds and nested groups are returned. When there is an error, it is consistently this error:
Auth0: Error Getting Nested Groups.Group:<guid deleted from error text> Response: { "code": 500, "error": "Script generated an unhandled asynchronous exception.", "details": "Error: Blocked event loop", "name": "Error", "message": "Blocked event loop", "stack": "Error: Blocked event loop\n at :1:38\n at nextTickCallbackWith0Args (node.js:489:9)\n at process._tickDomainCallback (node.js:459:13)" }
Please advise on how to proceed and let me know if more information is required.
Hello everyone! Is everyone using the Auth0 Authorization extension here? If so, we’ve seen this blocked event loop before and it’s a ongoing challenge with the Authorization extension as detailed here in this Github issue:
If you could please answer the following questions here in this thread as well in the Github issue thread. It will allow us to further gain traction on eliminating this hurdle:
What version of the extension you are using?
What is your storage type (extension storage vs S3) and approximate storage size?
Could you share some metrics about your data? i.e. how many users, groups, roles, etc do you have?
What endpoints are causing the error? e.g. /policy , /login , group/roles management?
What is your storage type (extension storage vs S3) and approximate storage size?
Extension
Could you share some metrics about your data? i.e. how many users, groups, roles, etc do you have?
We’re currently in development and a very small team at that, have 2 active users at any time with ~10 users total in the system. 3 roles.
What endpoints are causing the error? e.g. /policy , /login , group/roles management?
GET /users/{userId}/roles
What version of the extension you are using?
2.4. I see 2.5 is available, but have not upgraded yet.
What is your storage type (extension storage vs S3) and approximate storage size?
Extension Storage
Could you share some metrics about your data? i.e. how many users, groups, roles, etc do you have?
Users: 350
Total # of Overall Groups, Including Top-Level and Nested: 1,400.
Nesting represents organizational divisions in our use case. One parent group can have many nested child groups.
Roles: 1
What endpoints are causing the error? e.g. /policy , /login , group/roles management?
GET groups/{groupId}/nested
@kstacks@simon3 Please make sure you relay your responses to the previous questions to Github issue as well. This allows for better tracking/follow up when the issue is resolved. Thanks!
As stated in the Github issue comment, the following solution for the issue is as follows:
To fix this issue perform the two following actions:
Migrate your Auth0 tenant from Node 4 to Node 8 and then republish the Auth0 rule that is created by the Authorization Extension. Here is the documentation page that explains how to migrate your tenant to Node 8.
After you have migrated to Node8, open the Authorization Extension in the dashboard. In the upper right-hand part of the page, you’ll see your tenant name. Click on your tenant name and select “Configuration” from the drop down menu. On the “Configuration” page, click the “Publish Rule” button. This will recreate your Auth0 rule to use the Node8 runtime.
I wanted to make sure I kept you in the loop on these recent events and if you have any additional questions on the matter please feel free to let us know. Thank you.