Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I set up nginx to serve a rails application for our intranet. It runs on a osx server blade with snow leopard. When I work on the server and go to localhost:8444 it runs very smooth and fast, but when I connect to the server over the network on a different client, it takes around 30-50 seconds to load one page (and then it is even displayed not correctly as there are missing javascript files).

my nginx.conf looks like this:

worker_processes 1;

events {
  worker_connections 1024;
}

http {
  include mime.types;
  default_type application/octet-stream;
  sendfile on;
  keepalive_timeout 65;

  passenger_root /Users/myuser/.rvm/gems/ruby-1.9.2-p180@rails311/gems/passenger-3.0.9;
  passenger_ruby /Users/myuser/.rvm/wrappers/ruby-1.9.2-p180@rails311/ruby;

  server {
     listen 8080;
     #server_name my_intranet;
     root /Users/myuser/rails/myapp/public;
     passenger_enabled on;
     rails_env development;
  }
} 

I tried using more worker_processes but that didn't change anything. Before the application was running on WEBrick on port 3000, now on nginx port 8444. I declared a NAT rule on our router that forwards requests from port external port 3000 to internal port 8444 (so the link to the app does not change for end users).

Any ideas what could be the reason (I am using the same nginx.conf on my notebook and it performs good over network...)

share|improve this question
    
Did you check your network? May be it's heavily congested or there is losses due to bad cable or smth? –  DukeLion May 29 '12 at 10:54
    
i just realized that my 2 colleagues on other computers have a quite good performance... but I have on 2 different machines very bad performance.. –  frank blizzard May 29 '12 at 11:02
    
I'd check DNS settings on client and server. –  Bart Silverstrim May 29 '12 at 11:03
    
I connect directly on the IP - same DNS as other machines that perform good. –  frank blizzard May 29 '12 at 11:06
    
should I have more than one worker_processes ? –  frank blizzard May 29 '12 at 11:06
show 1 more comment

1 Answer

Your problem is not related to your server configuration. It's your desktop or network problem slowing down page load.

share|improve this answer
    
then why does this only happen since the switch to nginx ? before, using webrick, everybody was having the same performance... –  frank blizzard May 29 '12 at 11:51
    
probably it is some cache related thing... another browser works much better... –  frank blizzard May 29 '12 at 11:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.