I came across a problem when updating from rails3 to rails5, every time I 
request an image and the file is missing, the requests takes almost 2 
seconds to finish because of the routes table taking too long to render (I 
have a project with +2600 routes).

If 5 or more images are missing, it takes so long that even some of them 
render this error:

Internal Server Errorcould not obtain a connection from the pool within 
5.000 seconds (waited 5.208 seconds); all pooled connections were in use
------------------------------
WEBrick/1.3.1 (Ruby/2.2.2/2015-04-13) at localhost:3002
I know that adding the missing images fixes the routing error and all that, 
but it's a local dev environment of a site with a lot of not crucial images 
and I really don't need them taking up my disk free space to develop.

So, my question is, should rails render an error page when the requests is 
an image request? the request header has 'Accept: 
image/webp,image/*,*/*;q=0.8' so rails could be able to detect that it's an 
image request and not render the whole Routing Error page.
I made another issue proposing an option to disable the routes table on the 
Routing Error page, but that would be workaround and a solution to another 
problem.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to