Skip to content

Conversation

@shellandbull
Copy link
Owner

@shellandbull shellandbull commented Apr 8, 2025

LRUG 2025 | AI + Observability demo

In this PR

🐞 Instead of querying directly by user ID we load all of the users in memory to then find an AR model who's id attribute matches params[:id]

ActiveRecord::QueryCanceled (PG::QueryCanceled: ERROR:  canceling statement due to statement timeout):
  
app/controllers/api/users_controller.rb:42:in `index'
app/controllers/api/users_controller.rb:42:in `block in index'
app/controllers/api/users_controller.rb:42:in `each'
app/controllers/api/users_controller.rb:42:in `index'

Started GET "/api/users/123" for 127.0.0.1 at 2025-04-08 14:22:13 +0000
Processing by Api::UsersController#index as HTML
  Parameters: {"id"=>"123"}
  User Load (30012.1ms)  SELECT "users".* FROM "users"

📖 code2prompt output. See diff

🥃 A guided walkthrough through using LLMs to debug. See comment thread

@shellandbull
Copy link
Owner Author

fix with chatgpt

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant