Mongrel very slow on Vista

Hi

I have a problem where mongrel on vista is veeeery slow. I've confirmed in with two different computers running Vista. Same code has no problem on XP or Linux.

Basically on both of my Vista instals, looking at "net" section of firefox, I can see that it appears to take 1sec between each asset.

This seems really nuts. Has anyone else managed to get mongrel working nicely with vista ?

Any help much appreciated.

Jonah (jonah@parkerfox.co.uk)

What does the log show when it handles a request? What version of ruby are you running on Vista? Does it differ from that installed on the other 2 OSes?

If it's just a ruby quirk, lighttpd & webrick should run pretty smoothly. I'm guessing this may be some kind of threading problem? [I'm assuming you're not using mongrel cluster].

I'm also guessing you're just using RoR in Vista for dev work or nerd points, not as a production environment :wink: so maybe falling back on lighty for a while wouldn't do any harm?

Well it seems v slow regardless of the version of ruby (tried a couple).

Additionally - it seems that its only firefox that causes problems. IE7 is fine. FF starts ok and it seems to get progressively worse.

In answer to your questions:

* Log looks fine, seems to run at expected speed - only the download is the slow * Ruby version = 1.8.6 * I've tried same thing with ruby 1,8,5 * Not using mongrel cluster * correct about the dev work

so maybe falling back on lighty for a while wouldn't do any harm?

not really - just the migration pain and the 'im used to mongrel' part.

thanks for the feedback

Jonah

well it was all working well on XP and really it only seems to be firefox on mongrel on vista that works badly.

so it's nearly there !!! but not quite !!

weepy wrote:

well it was all working well on XP and really it only seems to be firefox on mongrel on vista that works badly.

so it's nearly there !!! but not quite !!   

How is firefox performing with other websites hosted on the local machine? maybe it's a resolving localhost issue? What are connection settings in Firefox? Are you behind a corporate proxy? Is firefox going out to that proxy then back to the local machine (i.e. do you need to enable ignoring of proxy for localhost).

Anthony

The same app works ok with webrick in Firefox

Connection settings are out of the box install. No proxies.

Very odd.

What happens if you spoof the FF user agent as, say, IE7?

If you open another tab in FF and go to about:config, is "network.http.pipelining" set to true? if it is, try turning this off or reduce the maxrequests.

Have you tried connecting to your app from a gecko-based browser on a remote machine?

I'm just throwing ideas out here...!

Thanks for the good ideas chris -- unfortunately I caved in, flattened and installed XP !

Ill try them on another machine if i get a chance :slight_smile:

Hi Phil

I was on 32 bit

What a weird problem. Vista - Mongrel - Firefox.

Yes !!

I notice that mongrel 1.0.2 is out - perhaps this fixes ? though i cant see it in the changelist.

also i was using rails 1.2.5 and have seen the same problem with 1.2.3 on another computer.

a last resort, look into rails/ruby profilers maybe.

The problem was with static resources - so I guess this is a mongrel problem rather than a rails problem.

IE will try to pre-render the page while it's downloading, so a bad resource isn't as noticeable. Firefox waits for the complete doc before rendering certain elements such as tables and such.

was IE requesting different files?

no

IE will try to pre-render the page while it's downloading, so a bad resource isn't as noticeable.

We're talking 1 second per resource with say 40 resources. They seem to load sequentially so the whole page load takes ~40s !

How about maybe you run it on real solid platform, you know, something other than vista. The moral of the story is, you sell your soul to devil and eventually he comes for it.

I got this problem and I fixed it...

Open C:\Windows\System32\drivers\etc\hosts

then remove the row with "::1 localhost" its the IP6 adress

or u can try to go to 127.0.0.1:3000 instead...