Answer the question
In order to leave comments, you need to log in
Where is the ENV["RAILS_MAX_THREADS"] variable set?
Hello. And do not tell me where the ENV["RAILS_MAX_THREADS"] constant changes, otherwise
users got an error
could not obtain a connection from the pool within 5.000 seconds (waited 5.000 seconds)
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
Answer the question
In order to leave comments, you need to log in
I'll answer myself :)
Everything was decided through foreman and the ".env" file in which you can set environment variables used in Rails
RAILS_MAX_THREADS=100
WEB_CONCURRENCY=2
env - enviroment, environment variable, if you have Linux set it on the command line, if locally you can do something like this:
touch .secrets.sh echo "export RAILS_MAX_THREADS=YOUR_MAX_THREADS" >> .secrets.sh && source .secrets.sh
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question