Score:0

Rails app reload is too slow on production using Puma and Nginx

cn flag

I have a little bit bigger project on Rails (6.0.1), running on latest Puma, using socket with latest Nginx and Debian system.

App works great, but when I perform reload :

rbenv exec bundle exec pumactl -F ... restart

It takes a huuuuge time with loading page for users. It is around 2 minutes. But when I try it on test environment it restarts in 15 seconds.

So I think it should be something with workers (because production is under load) maybe nginx keepalive, I don't know, and I am asking for help.

I am using Bootsnap, and I tried to find problem with Bumbler, I found that we have 1 slow scanning path, but it is around 20 seconds, not too much. I will improve in next step. This scan path should slow down test environment also.

I am little bit lost, because I had this same application on older system with Rails 6 and few older gems (but not much) it worked fine, reload at 3 - 5 secs and I moved it on new server and problem appears. On former server I did not have access to Nginx config file.

Please any suggestions.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.