above error getting on production. it's working on staging env.
in database.yml given below configuration
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 4000000
also for each loop i have used
(2..spreadsheet.last_row).each_slice(500) do | batch |
batch.each do | i |
# remaining code here
end
end
but after using above still getting same error on production env.