The method to handle this changed between Mongomapper versions.
The correct way now is to use Mongomapper's convenience method in your initializer:
MongoMapper.connection.handle_passenger_forking
Question
we're on rails 3.2.12, passenger + nginx (1.0.10), mongo 2.2, and mongomapper 0.12.
we were told that passenger and mongo don't work well together unless there is a configuration set to ensure speedy database connections (or reconnections).
however, one person advised us to use the code here: http://pastie.org/572282. then we found this post on stackoverflow (mongoDB, passenger and performance issues with phusion passenger), which is different.
which is the right way to ensure optimal mongo performance with passenger (and nginx)?
Solution
The method to handle this changed between Mongomapper versions.
The correct way now is to use Mongomapper's convenience method in your initializer:
MongoMapper.connection.handle_passenger_forking