ruby net/http opening connection very slow

一个人想着一个人 提交于 2019-11-29 11:40:24

Old issue, but I recently had the same problem.

It seems to be a problem with certain versions of libc which resolve DNS routes. After spending couple hours to search solution you just need to add require 'resolv-replace' at the beginning of your code.

More information: https://github.com/ruby/ruby/pull/597#issuecomment-40507119

Hope this help somebody in the future.

It was an issue with DNS server. Switched to google public DNS (8.8.8.8, 8.8.4.4). Thanks @Ineu.

Eventually what solve the problem for me was disabling the Antivirus. I have Norton Security

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!