From b885ff6ac08dcbe1119fe9fd632e04eb980b0b56 Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 12 Oct 2023 22:08:24 -0700 Subject: [PATCH] Increase timeout on modeling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Okay so… I'm worried about this because of Rails whole single-threaded situation, which doesn't really let it handle blocking on external network requests very well. Ultimately I think we're gonna have to do a clever thing but idk quite what? I should look into whether like, puma + the new async stuff can enable Rails to be more tolerable about this, and handle a few requests at once, instead of having to have the Neopia server doing it. (Right now, the Neopia server isn't really doing its job quite right, because it depends on the Rails app being *local* to send stuff to it.) But for now, let's just extend the timeout, cuz it's basically always getting hit in production—because there's currently no other way to do modeling, oops lol --- app/controllers/pets_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/pets_controller.rb b/app/controllers/pets_controller.rb index a4456839..13d0dd07 100644 --- a/app/controllers/pets_controller.rb +++ b/app/controllers/pets_controller.rb @@ -14,7 +14,7 @@ class PetsController < ApplicationController @pet = Pet.load( params[:name], :item_scope => Item.includes(:translations), - :timeout => 1 + :timeout => 2 ) points = contribute(current_user, @pet)