Server is slow or unresponsive (internal server error)
|
|
Hi Brightbox, Our websites that are builed on Rails (Passenger) and using Shared Database shows Internal Server Error. Well I thought updating the passenger and the server would fix the problem. So it did.. well .. not for long. It shows the same error again. Another similiar problem So I was wondering if the Shared Database is that cause the problem. I’ve read the news there was a maintenance going on 2nd of June 2009. I wonder if that’s still the case. That’s not the only problem, our whole server seems to be unresponsive. Even our simplest website without database, doesn’t show at all. How can I fix this? Or is there another sulution for this? Thanks in advance Harianto |
|
|
Hi Harianto, can you paste any relevant look messages from /var/log/apache/error.log ? Thanks, John. |
|
|
also the output from: sudo grep "Out of memory" /var/log/kern.log Thanks, John. |
|
|
there’s semething about the “swap”. it’s ZERO? |
|
|
And I’m also wondering if it’s too much running 8 Rails websites with Passenger on a Brightbox 256? |
|
|
For most common Rails deployments, swap space just delays the inevitable ram exhaustion, and in the process slows down your box massively and puts very heavy load on our SANs. So it is disabled by default. We recommend that you plan your deployments so that you don’t overcommit your ram. I think 8 Rails web apps on a 256 box is stretching it too far. Even if your apps were very very small (let’s say 35mb), and you limited them to 1 instance per app, that would still be 280mb RAM, even before Apache, ssh etc. Even with the highest Passenger spawner settings, I doubt you’d get 8 apps running on there. And you only get 5 MySQL connections with a 256 box too, so only 5 instances could use the MySQL server at a time (assuming they need it). I’d recommend you estimate how much ram each app usually uses after it’s been running a while, and then upgrade your Brightbox accordingly. To ensure the least ram usage, set PassengerMaxInstancesPerApp to 1 and PassengerMaxPoolSize to the number of apps you need to have running. Also, try setting RailsSpawnMethod to smart (though this can break some apps, so test thoroughly). More documentation on these settings here: |