From: shugo@... Date: 2016-12-07T05:11:36+00:00 Subject: [ruby-core:78525] [Ruby trunk Bug#13007] Webbrick takes 5s to start when machine name looks like a real domain Issue #13007 has been updated by Shugo Maeda. Shyouhei Urabe wrote: > Sad news is gethostbyname blocks under the hood in the system library, not in ruby's code. > > But webrick's issue might be resolved already by issue #6559. Can you try the latest trunk to see if that fixed your problem? It seems not a reverse lookup issue, but a forward lookup issue. It sounds reasonable to delay the call of Utils.getservername so that users can override ServerName, in which case there's no need to call Utils.getservername. ---------------------------------------- Bug #13007: Webbrick takes 5s to start when machine name looks like a real domain https://bugs.ruby-lang.org/issues/13007#change-61910 * Author: Michael Grosser * Status: Open * Priority: Normal * Assignee: * ruby -v: 2.3.3 * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- sudo scutil --set HostName foo.local ruby -r socket -e "Socket.gethostbyname(Socket.gethostname)" or much simpler: ruby -r socket -e "Socket.gethostbyname('foo.local')" called from webrick/config.rb:24 ... Utils::getservername Ideally this should be lazy, so I can override ServerName and avoid this ... or not do a remote lookup at all by default -- https://bugs.ruby-lang.org/ Unsubscribe: