Webrick slow when running on a stand-alone system

J

Jim Weirich

I've developed a small app for a laptop using Webrick. It serves pages to
a local browser. It works great when the laptop is connected to the
internet. But when then laptop is running without an external network
connection it runs very slowly, with long pauses before serving a page. I
am guessing it is trying to do some kind of lookup and is timing out. Is
there a way to disable that behavior.

The problem is occuring on a Windows 98 box running Ruby 1.8.1 (with the
included Webrick).

Any ideas?
 
M

matthew c. mead

I've developed a small app for a laptop using Webrick. It serves pages to
a local browser. It works great when the laptop is connected to the
internet. But when then laptop is running without an external network
connection it runs very slowly, with long pauses before serving a page. I
am guessing it is trying to do some kind of lookup and is timing out. Is
there a way to disable that behavior.

The problem is occuring on a Windows 98 box running Ruby 1.8.1 (with the
included Webrick).

My guess would be it's doing a reverse lookup for a PTR record
based on ip address so it can log it by name. Just a guess,
though, since I've not used webrick.



-matt
 
N

Nathaniel Talbott

I've developed a small app for a laptop using Webrick. It serves
pages to
a local browser. It works great when the laptop is connected to the
internet. But when then laptop is running without an external network
connection it runs very slowly, with long pauses before serving a
page. I
am guessing it is trying to do some kind of lookup and is timing out.
Is
there a way to disable that behavior.

The problem is occuring on a Windows 98 box running Ruby 1.8.1 (with
the
included Webrick).

Just a hunch... try this at the beginning of the program:

Socket.do_not_reverse_lookup = true

I've heard this mentioned as the solution to several previous WEBrick
problems, and it seems like it might be related to yours.

HTH,


Nathaniel

<:((><
 
J

Jim Weirich

Nathaniel Talbott said:
Just a hunch... try this at the beginning of the program:

Socket.do_not_reverse_lookup = true

I've heard this mentioned as the solution to several previous WEBrick
problems, and it seems like it might be related to yours.

Good hunch. Unfortunately, it didn't seem to do anything.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top