Ruby server is very slow outside the local host (timbox)

I just installed TeamBox on my Ubuntu 9.10 server. I run it on server 3000 using the provided server script.

It works very slowly, up to 30 seconds per HTTP request when connecting from another computer.

I used the links to download TeamBox from the shell, and it took some time.

Then I installed the SSH tunnel and it worked very fast again.

I run about 30 vhosts via apache on this server, as well as SAMBA, etc., and I have no problem.

How to fix this problem?

+5
source share
3 answers

redmine (ruby, webrick) . : apt-get install mongrel
ruby /home/redmine/redmine/script/server mongrel -e production
, redmine !

+10

? , , -.

 # Speeds up spawn time tremendously -- if your app is compatible.
    # RMagick seems to be incompatible with smart spawning
    RailsSpawnMethod smart

    # Just in case you're leaking memory, restart a listener
    # after processing 5000 requests
    PassengerMaxRequests 5000

    # only check for restart.txt et al up to once every 5 seconds,
    # instead of once per processed request
    PassengerStatThrottleRate 5

    # Keep the spawners alive, which speeds up spawning a new Application
    # listener after a period of inactivity at the expense of memory.
    RailsAppSpawnerIdleTime 0

    # Additionally keep a copy of the Rails framework in memory. If you're
    # using multiple apps on the same version of Rails, this will speed up
    # the creation of new RailsAppSpawners. This isn't necessary if you're
    # only running one or 2 applications, or if your applications use
    # different versions of Rails.
    RailsFrameworkSpawnerIdleTime 0

    # Keep the application instances alive longer. Default is 300 (seconds)
    PassengerPoolIdleTime 1000
+2

RoR- Nginx - HTTP (S), ( ).

Nginx RubyOnRails .

redmine, Nginx OpenVZ, !

+1

All Articles