How to reduce memory usage of Redmine?

Good afternoon.

Prompt, please, possible solutions to the following tasks:

You have a virtual server with Ubuntu 10.04 (32 bit), which turns Redmine. It does not touch, therefore, you want to led it be modest :)

Everything was done according to this manual (Apache 2 + Passenger, Redmine 1.0.1) and consumes an average of around 450 MB of memory (according to the panels selectel). What is especially sad — occasionally it crashes and Passenger shows a beautiful message about "Internal server error" (sadly because of knowledge for proper setup, I have clearly not enough, and different manuals for setting up too many and one can easily get lost).

In General, I would be glad if anyone tell me in what direction do you need to dig :)

Google says that the solution probably has something to do with nginx and Ruby Enterprise Edition. Or am I mistaken?
October 8th 19 at 01:52
6 answers
October 8th 19 at 01:54
And even better, nginx+thin.
So the most optimal would be a bunch of nginx+thin+ree? - raleigh_Kemm commented on October 8th 19 at 01:57
October 8th 19 at 01:56
At least, nginx + passenger will eat significantly less.
October 8th 19 at 01:58
nginx + unicorn rails, such problems did not notice
October 8th 19 at 02:00
This problem can be caused by:
1. Version 1.0.1 is quite old (now current 1.3.2).
2. Something in the package Ubuntu screwed up.
3. Something with a passenger.

Possible solution:
1. Assemble a new Passenger:
$ sudo gem update passenger
$ sudo passenger-install-apache2-module

2. Update ubuntu-redmine (in the team I could be wrong):
$ sudo apt-get upgrade ubuntu-redmine

3. Carry the fuck ubuntu-redmine and put themselves in this instructions the latest version. But instead expand the database update for this instruction (with pre-bekapa database and /files, of course).
The 3rd option is probably best, because for me this is another opportunity to better understand what is happening.

So far, only one question: if I make a database dump from the old version of Redmine, and install it already 1.3.2, how to migrate data into the new database? Pour a dump and make rake db:migrate? - raleigh_Kemm commented on October 8th 19 at 02:03
If to be exact,
rake db:migrate RAILS_ENV=production

However, all is not so simple, because it is necessary to migrate a part of the database that the plugin created. In addition to updating the database (Second link, Step 4.), don't forget that if you filled the file, they have to migrate to the new version ruchami (Second link here, Step 2, Backing up the files).

Judging by the logs, remain located in the folder /usr/share/redmine, you can make a backup, database backup (so you can revert to "as was").

Manuals for installation and upgrade quite detailed and fairly simple, but if you have any questions, welcome to PM — I will answer honestly to all the questions to know the answers! - raleigh_Kemm commented on October 8th 19 at 02:06
Well, as suggest below — try nginx. - Alexandrea.Kemmer commented on October 8th 19 at 02:09
The plugins I installed, so this problem should not arise. The manuals really are very detailed. The only thing that bothered me is the number of options for setting up a rails environment.

Thank you very much for the help! - Alexandrea.Kemmer commented on October 8th 19 at 02:12
October 8th 19 at 02:02
nginx + unicorn (1 worker) + ruby 1.9.3 (this is IMHO better than ree)
October 8th 19 at 02:04
you can simply reduce the number of sarkerov to 2-3.
5.12.1. PassengerMaxPoolSize The maximum number of Ruby on Rails or Rack application instances that may be simultaneously active. A larger number results in higher memory usage, but improved ability to handle concurrent HTTP clients.

Similarly, for the Unicorn:
worker_processes 2
Yeah, yesterday already found information about it. Like a lot of the discussions from the category "passenger vs thin vs unicorn vs whatever" :) - raleigh_Kemm commented on October 8th 19 at 02:07

Find more questions by tags SelectelRedmineRubyHostingLinux