|
How can I reduce my Ruby/Rails memory usage when running Redmine? Redmine seems to use quite a bit of my plan's memory ~60MB on an empty project how can I reduce that? |
|
Hi, Great question Klynton! ;) Here's a nice little wrapper script that you can use to reduce the memory usage for your Redmine project:
then just have nginx call this script instead of the ruby executable. That will reduce your memory usage by ~20MB, at least. This looks great. Which file does this go in, though? Sorry, I'm new to this... Hi, You can put it in a file called ruby.sh then just point your nginx script to the full path to ruby.sh instead of /usr/local/bin/... There should be a line in the
You will want to change it to something like this:
Then, create the new "ruby_small" file with the contents as Klynton described. Lastly, set the permissions ( It worked, thanks! The only thing I needed to change on top of that was to change the last line: exec "ruby" "$@" to: exec "/full/path/to/ruby" "$@" Will this work for a non-redmine project? I have a couple of rails 3.1 projects that are using an over abundance of memory that I need to get a handle on... Yes, it will work on other ruby-based apps too. Works well. But just wondering, it seems that Passenger ApplicationSpawner also sucks down a chunk of memory, and it eventually seems to spawn several redmine instances -- is that OK? Does this happen when the old instance runs out of memory? Is there any way to keep a lid of the number of instances spawned and what would the adverse effect be if any? @pixelglow, multiple process threads are normal. You may want to submit a support ticket so we can see what you are describing in real time.
showing 5 of 8
show all
|
|
Thank you very much, ryans. I updated the call to the 'ruby' executable with the full path and it works. |