This project is archived and is in readonly mode.
New 2.3.3 app perf very poor from remote machine
-
Duncan Bayne
Apologies for the formatting; I'm not used to any defect tracking system that uses anything other than plain text.
-
Duncan Bayne
Also, Ruby version:
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
-
Duncan Bayne
This is caused by the Ruby package on Ubuntu 9.04 being compiled with the pthreads option; see https://bugs.launchpad.net/ubuntu/+source/ruby1.8/+bug/307462. Apparently recompiling Ruby without the --enable-pthread flag fixes the problem.
-
sam.hendley
I would like to report that I tried this fix and it didn't help. I compiled ruby 1.8.8 from source on Ubunutu hardy and it didn't fix this issue. This seemed like a crazy reason to 10 second timeouts anyways so I dug a little deeper. I ran strace on the server program and saw that the delay was due to a reverse ip lookup that was timing out after 15 seconds, from strace:
write(4, “RESOLVE-ADDRESS 127.0.0.255\n”, 28) = 28
read(4, “-15 Timeout reached\n”, 1024) = 20googling on this I found this page http://qzdrproject.wordpress.com/2008/08/27/troubleshooting-network... which was having the same general issue and had the same strace output. They suggested turning off avahi demon which I did and then boom! everything is working as expected. Now I just need to figure out what that service was doing and if I can live without it.
This lookup can be disabled by turning off the "BasicSocket.do_not_reverse_lookup = true" flag in the socket class. Could that have been what changed between 2.2.2 and 2.3.x? Does that reverse lookup get used or is it just an unnecessary slow down that we throw away?
-
Roland Moriz
@sam
Looks to me that you've weird LAN setup with zeroconf/avahi trying to resolve the reversemapping of 127.0.0.255 all the time which isn't possible and leads into a timeout — you probably just want to fix the lookup (/etc/resolv.conf /etc/hosts /etc/nsswitch + your zeroconf settings).
Anyhow, disabling reverse lookup should be a good idea because it blocks even when it works. I'm suprised ruby's default was to do a lookup (crazy) until Feb 2010:
http://redmine.ruby-lang.org/issues/show/1811 and http://redmine.ruby-lang.org/repositories/revision/ruby-19?rev=26541
It still might be a good idea to change the rails code to speed up 1.8.7 users (even with working dns)
-
Rohit Arondekar
Any updates to this ticket?
-
Mike Riley
- State changed from new to stale
- Importance changed from to Low
Hello,
Due to the date when this originally was entered and no further updates to it I am going to close this. If there are any further updates, feel free to reopen with more information.
Mike Riley
