On Sep 11, 2009, at 6:47 PM, Chris wrote: > I saw Ben's blog app 'minger' has been built with MongoDB. Thanks for > sharing that. A few questions about mongodb usage with pylons: > - is setting up the mongo connection in lib/app_globals.py the > recommended way to go? (like minger)
For connection pools and such, I'd consider app_globals the best place to hang it. Since app_globals is global to the application, the object there should be thread-safe of course. > - it looks like pymongo has a built-in connection pool (defaults to > 1), should that be higher for production sites? Should it match the > number of threads that Paste (or others) will spawn? Ah yes, I suppose I could up it. I actually hadn't realized at the time that it was using its own connection pool. Ideally it should probably match however many connections your MongoDB server handling, and of course, less than or equal to the number of threads that are being used for the application. Cheers, Ben --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
