I've been running a nginx+unicorn rails application successfully on EC2 for a while but I decided to get a test server up in one of my VPS servers.

I just installed nginx in my VPS, got the gems all going, changed the config files accordingly and tried to get the whole thing going. The problem started with random requests returning 502 errors. When I decided to stop the server and restarted again, I got a memory corruption error detected by glib with a huge stack trace that I'll post below.

Anybody has any idea of what's going wrong here?

I'm starting the server with:

bundle exec unicorn_rails -c config/unicorn.rb -D

The system where the thing works is: (CentOS 5.6)

Linux ip-10-146-117-213 2.6.16-xenU #1 SMP Mon May 28 03:41:49 SAST 2007 i686 i686 i386 GNU/Linux

Rails 3.0.9 Unicorn 3.6.2

System with problems:

(Debian wheezy/sid)

Linux www8221u 2.6.38-2-686 #1 SMP Thu Apr 7 05:24:21 UTC 2011 i686 GNU/Linux

Rails 3.0.9
Unicorn 3.6.2

The stack:(given the character limit, I had to post the stack trace in a Gist. If you guys would rather have part of the stack trace here, I'd be glad to post it)


1 Answer 1


Problem solved. The problem was related to the ruby version that I compiled myself. It seems it was conflicting with some other library.

Solved the whole thing uninstalling everything ruby related and reinstalling using rvm.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .