V
V
Vyacheslav Alekseev2014-05-17 18:30:16
Nginx
Vyacheslav Alekseev, 2014-05-17 18:30:16

How to optimize Nginx + Passenger + Ruby on Rails

Hey!
I installed Ruby from RVM on pure Debian (VDS 512mb RAM) and installed nginx along with passenger via passenger-install-module-nginx (if I wrote the command correctly).
How to optimize all this? The server is terribly slow - you can wait 15-30 seconds for a response to a request (ping to the server is normal).
RAM problem? Is this not enough?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Viktor Vsk, 2014-05-17
@AlexeevVyacheslav

hmm i disagree
More or less normal applications worked for me on nginx + unicorn. True, sass assets could not be compiled on the server - they ran into a swap.
There were 128 MB of RAM, 700 processors, 256 swaps.
I am not familiar with the pessenger, but I do not think that the difference can be so significant. Maybe it's not about ruby ​​or the server at all? Try to determine what is the plug
PS
On 8 gigs I know 6 applications work in production, 2 of them are quite popular. Plus, there is also staging for development there.

I
Igor Vorotnev, 2014-05-18
@HeadOnFire

Give up Passenger once and for all, he's gluttonous. On my server with 1GB of RAM, along with a dozen sites on WP (Nginx, PHP5-FPM, Memcached, MariaDB), Redmine is running in parallel on Unicorn. Initially, according to the lessons, I tried to set it up through Passenger - a bunch of crap and resources ate hard. After switching to Unicorn, everything flies. There is also an option with Thin, but I have not tried it myself.

P
Puma Thailand, 2014-05-17
@opium

512 megabytes is generally the smallest RAM size that you can think of, of course this is not enough for ruby, raise it to 4 gigs and see how it works.

A
Alexey Lesovsky, 2014-05-17
@lesovsky

Look at the passenger-status output for "Waiting on global queue". It is quite possible that requests are queued from that and the response time is horse.
And of course thoughtful reading of this docks
is required PS try unicorn as an alternative

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question