Sam Kong
Sam Kong

Reputation: 5810

Rails app stuck

I am running a rails app on Dreamhost. Today, a strange thing happened. A page is almost loaded (it seems to be fully loaded but the status is not 'Done') and after that, the app didn't respond on any page.

I checked out the log and even the log was not complete. How do I know it? There are 3 missing images on the problem page and the log showed only 2 missing images and stopped there. So I guess that something happened between the 2nd and the 3rd missing images.

I couldn't even start 'script/console production'.

After 14 minutes, it began to behave normally. I asked the hosting company and they said that the process was killed due to over-use of memory. Probably something was running heavily during the period.

The same thing happened one more time. I had to kill the process to unlock the stucked app.

Passenger version is 2.2.4 and rails version is 2.3.2. I am afraid that I can't give more specific info.

What do you guess cause such a problem?

Thanks.

Sam

Upvotes: 1

Views: 132

Answers (3)

Alessandra Pereyra
Alessandra Pereyra

Reputation: 2640

Try using NewRelic RPM or TuneUp Lite to see what process is chunking most of your memory. You can run them locally but it would be better to test it on production.

Upvotes: 2

Eric
Eric

Reputation: 766

As theIV stated, look at the last action called. Start this up locally and try to go through what was happening on the server to see if it's reproducable, or if you just get any sort of general hiccups. I've run Rails apps on Dreamhost for a while, and have not experienced this before, so I would guess that it's not Dreamhosts fault, but there is no 100% on that.

Good luck!

Upvotes: 3

theIV
theIV

Reputation: 25774

This sounds pretty app specific. I would start by looking at what action was last hit before the process started hoggin' and then work backwards from there to see if there are any calls that might be doing something you weren't expecting. Other than that, no clue. :(

Upvotes: 3

Related Questions