lynndylanhurley / lynndylanhurley/devise_token_auth

Too many database calls

Open
#1,302 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
3.6k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Way too many database calls. This is happening on every endpoint, but I'm using /validate_token as an example. Is this the expected behaviour to make 3 database calls just to fetch the user?

Those many database calls lead to other issues, for example, 500 error responses because user table is locked

Contributor guide

Open the contributing guide

Research direction

Start by tracing the /validate_token endpoint and counting its database calls, with particular attention to fetching the user and the user table lock mentioned in the report. Done means the endpoint no longer makes unnecessary calls and avoids the reported 500 responses caused by locking.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
authentication, backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.