Redmine 0.8.4 + Passenger: Memory leak and CPU overload

Added by Cédric RICARD over 9 years ago

On a single server, I have two redmine setup. Both are identical, except for the projects they hold, and one is public, the second is private.

And the public one give me headache! Every day, I need to kill Rails processes because they are eating all memory and CPU resources. This only occurs on public Redmine setup, never on private one.

Before, I was using Mongrel, but with the same effect: the mongrel process was quickly taking all memory and CPU.

Is it a known bug? What can I do to solve this problem?

Thanks.

Replies (13)

RE: Redmine 0.8.4 + Passenger: Memory leak and CPU overload - Added by Sam Clark over 9 years ago

I am also having the very same issue. This needs urgent attention

RE: Redmine 0.8.4 + Passenger: Memory leak and CPU overload - Added by Sam Clark over 9 years ago

I am running Redmine on a Opteron 64-bit CPU with Ubuntu 8.0.4 LTS, libruby1.8 and ruby1.8, using Passenger and Redmine 0.8.4

The ruby process will run fine for about 30 minutes and then start to use 100% of the CPU and eventually overload the server completely!

RE: Redmine 0.8.4 + Passenger: Memory leak and CPU overload - Added by Gabriel Credico over 9 years ago

Im also running a small Redmine app with (up until now only private projects). When i stop using the app for something like 1 hour and then come back the ruby-process produces an average cpu-load at most 100%.

the site isnt responding for about 1/2 minute (while it has 100% load) and when it finally responds it works like a charm with nearly no cpu load!

System:

- Debian
- apache + mod_passenger
- mysql
- ruby 1.8

RE: Redmine 0.8.4 + Passenger: Memory leak and CPU overload - Added by Eric Davis over 9 years ago

I haven't seen any memory leaks with my Redmine and my version of passenger. Passenger recently released a bugfix for a memory leak that might be the problem. http://blog.phusion.nl/2009/06/21/phusion-passenger-224-released/

Eric

RE: Redmine 0.8.4 + Passenger: Memory leak and CPU overload - Added by Cédric RICARD over 9 years ago

More information on this problem :
I've switched of source browsing for Anonymous since my first post. Since that day, I was forced to Kill Rail process only once (before, it was once a day!).

And I don't think that is a Passenger problem because I had exactly the same bug with Mongrel...

RE: Redmine 0.8.4 + Passenger: Memory leak and CPU overload - Added by Yannick Warnier about 9 years ago

I have the same problem with Mongrel + Debian + MySQL and Redmine 0.8.1 but haven't managed to find out what the problem is until now. How can I track this better with RoR?

RE: Redmine 0.8.4 + Passenger: Memory leak and CPU overload - Added by Yannick Warnier about 9 years ago

There seems to be race conditions on the writing and reading of logs... We are disabling the logs right now to see if it continues to fail.

RE: Redmine 0.8.4 + Passenger: Memory leak and CPU overload - Added by Alexander Pánek almost 9 years ago

Yannick Warnier wrote:

There seems to be race conditions on the writing and reading of logs... We are disabling the logs right now to see if it continues to fail.

Did you have any luck with that?

RE: Redmine 0.8.4 + Passenger: Memory leak and CPU overload - Added by Cédric RICARD almost 9 years ago

Sorry,
I didn't test because a real leak (another one...) of time...

Please just tell me how to disable logs.
I've tried to set "config.logger = nil" into my production.rb file, but without success.

Thanks

RE: Redmine 0.8.4 + Passenger: Memory leak and CPU overload - Added by Yannick Warnier almost 9 years ago

Alexander Pánek wrote:

Yannick Warnier wrote:

There seems to be race conditions on the writing and reading of logs... We are disabling the logs right now to see if it continues to fail.

Did you have any luck with that?

No, and actually we didn't find the problem. In the end we removed a series of options whitout which Redmine still runs fine, and it stopped happening. We have no internal experience in RoR debugging, which makes it very difficult for us to know exactly what we are looking for.

I still believe that recovering details from several large SVN or Hg repositories might have been the main reason, but we failed to prove it as well.

RE: Redmine 0.8.4 + Passenger: Memory leak and CPU overload - Added by Alexander Pánek almost 9 years ago

Yannick Warnier wrote:

Alexander Pánek wrote:

Yannick Warnier wrote:

There seems to be race conditions on the writing and reading of logs... We are disabling the logs right now to see if it continues to fail.

Did you have any luck with that?

No, and actually we didn't find the problem. In the end we removed a series of options whitout which Redmine still runs fine, and it stopped happening. We have no internal experience in RoR debugging, which makes it very difficult for us to know exactly what we are looking for.

What options did you change/remove, if I may ask?

I still believe that recovering details from several large SVN or Hg repositories might have been the main reason, but we failed to prove it as well.

Yea, that could be a reason.. did you have a cron job set up for that?

Anyways, thanks for the info!

Cédric RICARD wrote:

Please just tell me how to disable logs

I honestly don't know how to do that. I've never seen the need for that, nor do I really recommend it.

RE: Redmine 0.8.4 + Passenger: Memory leak and CPU overload - Added by Derek Montgomery almost 9 years ago

Same issue here...
It even now leads to a crash of mysql since memory is so out.

Here are my details:
Ruby version 1.8.7 (i486-linux)
RubyGems version 1.3.5
Rack version 1.0
Rails version 2.3.4
Active Record version 2.3.4
Active Resource version 2.3.4
Action Mailer version 2.3.4
Active Support version 2.3.4
Application root /var/www/qw-dev.net/www
Environment production
Database adapter mysql
Database schema version 20091108092559

I am running Redmine trunk on Apache + Passenger:
www-servers/apache-2.2.14-r1
www-apache/passenger-2.2.5
dev-db/mysql-5.0.84-r1

and I also run a command to update all activity pages every minutes:
  • * * * * root ruby /var/www/qw-dev.net/www/script/runner "Repository.fetch_changesets" -e production

(+ a reposman cron every 10 minutes to autocreate new repositories)

HELP please!!

RE: Redmine 0.8.4 + Passenger: Memory leak and CPU overload - Added by Rostyslav Kinash almost 9 years ago

Just migrated my redmine from CentOS 5.2 to Debian 5.0.5
On Debian Redmine's SVN module crashes everytime becouse of memory leaks.

On CentOS everything was very stable.
Any ideas?

(1-13/13)