hasura / hasura/graphql-engine

Request timeout when updating permissions

Open
#6,848 2 comments 0 reactions 0 assignees View on GitHub
c/server
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

I've been using Hasura in production for a year or so now, and have started to hit limitations on the console. Updating permissions for a single role takes 20+ seconds for the request to complete, and almost always showing the below error:

![Screenshot 2021-04-29 at 14 33 24](https://user-images.githubusercontent.com/6038417/116558996-e3f7fa00-a8f7-11eb-8f6c-ce559f47fadc.png)

Sometimes permissions update despite the error, other times it can take 5+ attempts for it to save successfully. As I'm writing this, I've been trying to add select permissions for two columns and on the 4th attempt. This issue has got progressively worse over the last couple months.

Below information might be useful:

- Version: v2-alpha7
- Tables: 84
- Rows: 84,614
- Roles: 5 (excluding admin)
- Server: Heroku 2X Production Dyno (1GB RAM), Heroku Postgres Standard 0

You can see requests timing out in the dashboard whenever I try to update permissions, due to Heroku killing the app for memory usage.

![Screenshot 2021-04-29 at 14 41 11](https://user-images.githubusercontent.com/6038417/116560257-1bb37180-a8f9-11eb-9000-37554cdba5fb.png)
![Screenshot 2021-04-29 at 14 41 32](https://user-images.githubusercontent.com/6038417/116560268-1d7d3500-a8f9-11eb-9143-79b470d41b27.png)

Contributor guide

Open the contributing guide

Research direction

Reproduce updating permissions for a single role using the reported Hasura version, table and role counts, and Heroku Postgres setup; inspect the Heroku dashboard when the request times out or the app is killed for memory usage. Done means permission updates complete reliably without request timeouts or memory-related process termination.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
authorization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.