简体   繁体   中英

Rails 5.1.7 Server Hangs On First Request

We are trying to update a Rails Server to release 5.1.

Server starts fine; but on the first request, goes completely dead; and has to be killed with signal 9.

Doesn't matter if its Puma or Webrick.
Doesn't matter if its 5.1.0 or 5.1.7 Doesn't matter if its development or production mode.

Eventually I saw the process size was 90GB and growing!

I've tried rbtrace, but struggled to get anything meaningful out of it.

I'm on osx, so strace isn't available, and I've struggled to get dtrace or dtruss to work, or produce anything meaningful.

So looking for a way to get this rails server to tell me what it's problem is....

Let me know what additional information is salient.

After quite a long process, I found a solution that didn't so much find the source of the issue, but provided a process to work around it.

First off, I used

rails app:update

And accepted all of the overwrites. Then using git, I walked through all of the removed code from my config file and returned just the required sections [like config/routes.rb, and ActionMailer config, for example].

Application then started right up, no issue.

This also led me to

http://railsdiff.org/5.0.7.2/5.1.0

Which is pretty critical for Rails upgrading. This is well worth consuming:

https://github.com/rails/rails/issues/31377#issuecomment-350422347

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM