Webrick的反应非常慢.如何加快速度? [英] Webrick is very slow to respond. How to speed it up?

查看:105
本文介绍了Webrick的反应非常慢.如何加快速度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正在服务器上运行的Rails应用程序.当我进入远程桌面并尝试加载应用程序时,服务器会花费3-4分钟的时间来响应一个简单的HTML页面.但是,当我在服务器上本地加载页面时,该页面仅会显示一秒钟.我尝试从远程桌面ping服务器,并且在合理的时间内ping操作成功.

I have a Rails application that I'm running on my server. When I go to a remote desktop and attempt to load the application, the server takes a good 3-4 minutes to respond with a simple HTML page. However, when I load up the page locally on the server, the page shows up in just a second. I tried pinging the server from my remote desktop and the pings are going through successful in a reasonable amount of time.

这一切似乎在我安装了Oracle的基本客户端和SQLPLUS之后就开始了.我应该怀疑甲骨文吗?有没有人经历过类似的事情?

This all seems to have started after I installed Oracle's basic client and SQLPLUS. Should I suspect Oracle? Has anyone experienced anything similar to this?

推荐答案

此处存在相同的问题(甚至一年后).在Linux下,您必须执行以下操作:

Having the same issue here (even a year later). Under linux you have to do the following:

查找文件/usr/lib/ruby/1.9.1/webrick/config.rb并进行编辑.

Look for the file /usr/lib/ruby/1.9.1/webrick/config.rb and edit it.

替换行

:DoNotReverseLookup => nil,

使用

:DoNotReverseLookup => true,

重新启动webrick,它将像超级按钮一样工作:)

Restart webrick and it'll work like a charm :)

这篇关于Webrick的反应非常慢.如何加快速度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆