04
Dec
12

500 and server timeouts on Passenger and Apache

Ran across an error on Ubuntu 12.04 where Apache was serving 500s on an otherwise fine Sinatra app after moving hosts. It had been funning fine at Rackspace but was not running fine now.

Specifically there were timeouts and then errors that said that a proxy couldn’t be found, we weren’t running any kind of a proxy but I was able to figure out passenger was throwing that.

After putting in some google fu I found the following and added these lines to the apache config. Strangely enough these weren’t’ in place on the rackspace VPS but were needed when we moved them.

    1 # PassengerMaxPoolSize
    2 # Default: 6
    3 # For 2gb RAM: 30
    4 # For 256 slice with MySQL running: 2
    5 PassengerMaxPoolSize 2
    6 
    7 # PassengerPoolIdleTime
    8 # Recommended to be avg time per page * 2
    9 # In Google Analytics... (Avg time on site / Avg page views) * 2
   10 # Default: 300
   11 PassengerPoolIdleTime 144
   12 
   13 # PassengerMaxInstancesPerApp < PassengerMaxPoolSize 
   14 PassengerMaxInstancesPerApp 1
   15 
   16 # Must be used with RailsBaseURI in Vhost
   17 RailsAutoDetect off
Advertisements


Tweets

del.icio.us motion


%d bloggers like this: