Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.. – tmaximini 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. – tmaximini May 29 '12 at 11:06
should I have more than one worker_processes ? – tmaximini May 29 '12 at 11:06

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... – tmaximini May 29 '12 at 11:51
probably it is some cache related thing... another browser works much better... – tmaximini May 29 '12 at 11:54

Your Answer


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.