calvin-brand-light-mode
calvin-brand-dark-mode
∕
⌘K
About Calvin Podcast We Can Do This Book Speaking
aAbout Calvin
Podcast
wWe Can Do This Book
sSpeaking
Back

How to not lose requests when using Mongrel with Pen

Other
Calvin Correli·Apr 20, 2007· 1 minute

I use lighttpd + pen + Mongrel to serve most of my Rails apps, and so far, I’ve been serving a blank screen to some people after having deployed a new release, and I wasn’t sure why. For some reason I thought the problem was with Mongrel, until I realized that it was probably with pen.

My theory is that when pen tries to serve a request, it notices that all of the backends are suddenly dead, so it serves a blank page. But it also ban the backend process for 30 seconds, so even though it only takes a few for the backends to come back up, they’re now all banned for 30 seconds.

The trick is to add the following two command line parameters: -b 5 -t 10.

What that does is tell pen to only ban a backend for 5 seconds, and to not time out requests for 10 seconds, leaving the Mongrels plenty of time to come back up.

Previous [dk] Tilbuddet er udløbet
Next PublicSquare featured at DownloadSquad

Comments

Write a comment...
00:00 Recording...
calvin-brand-light-mode
calvin-brand-dark-mode
1 Chestnut Hill Plaza #1139
Newark, DE 19713
United States
Copyright © 2026 Calvin Correli
powered by