sproutcore / abbot

SproutCore Build Tools [deprecated]
http://www.sproutcore.com
88 stars 44 forks source link

sc-server proxyed applications show a 30s delay before any data reaches the app #68

Closed unicolet closed 12 years ago

unicolet commented 13 years ago

I am using sc-server to proxy some requests from two different (Java) backends, one of which is geoserver. Since last week I noticed that requests are proxied ok, but the connection from sc-server to the browser is kept open (until after 30s a timeout kicks in). On the other side of the proxy the connection from sc-server to geoserver (all on localhost) is opened and closed immediately. So it is not geoserver that suddenly became slow. The result is that data is not made available to the underlying javascript code until the 30s have passed.

I have packet captures that document this behaviour. Oddly enough this used to work and it never happened until I installed the strobe starter kit (which I have now removed, but without luck).

I have looked into lib/sproutcore/rack/proxy.rb but I can't figure it out by myself, so I'm openning this issue w/o a patch.

For the moment I have replaced a single file (proxy.rb) with this version:

https://github.com/sproutcore/abbot/blob/632263287bb853989d7df5719debe895110daae7/lib/sproutcore/rack/proxy.rb

and now proxied requests fly!

joegaudet commented 13 years ago

I also have this issue, would love to get on 1.7 beta but cannot until it's resolved.

wesw02 commented 12 years ago

Could either of you please provide an easy way for us to easily duplicate it. I've heard other people mention this issue, but I've never experienced it, despite using multiple different backends with sc-server.

unicolet commented 12 years ago

I was going to create a test-case, but then I remembered reading that this could have sthing to do with eventmachine.

And it seems that updating all my gems (including eventmachine eventmachine-1.0.0.beta.3 -> eventmachine-1.0.0.beta.4) fixed the issue. I'm on 1.6.0.1.