Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 338837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:27:59+00:00 2026-05-12T10:27:59+00:00

Our setup is standard nginx (ver 0.7.59) + thin upstream servers on Debian lenny.

  • 0

Our setup is standard nginx (ver 0.7.59) + thin upstream servers on Debian lenny. Right now we’re on 1 beefy box for web / app and 1 db box. Recently we started noticing thins will eventually start “hanging”, i.e. they will no longer receive requests from nginx. We have 15 thins running, and after 10-15 minutes, the first 1 or 2 will be hung. If left all day, those same few thins plus a few more will remain hung. The only fix we’ve seen so far is restarting nginx. After a restart, the hung thins begin receiving requests again right away. Because of this, it seems like those thins might have been taken out of the upstream pool.

If I understand the docs (http://wiki.nginx.org/NginxHttpUpstreamModule#server) correctly, with the defaults (which we have), if nginx can’t “communicate” with a backend server 3 times within 10 seconds, it will set that upstream server to an “inoperative” state. It will then wait 10 seconds, then try that server again. That makes sense, but we’re seeing the thin hang indefinitely. I tried setting max_fails to 0 for each of the thins, but that didn’t help. I can’t find out what would cause an upstream server to become permanently “inoperative”.

We’ve seen big growth rate increases recently, so we’re not sure if it could be related to that, or just more apparent as a result of more traffic in a shorter period of time.

Is there something else (a changeble directive or other conditions) in nginx that would cause it to take a server completely out of the pool?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:28:00+00:00Added an answer on May 12, 2026 at 10:28 am

    We have had numerous issues with nginx’s reverse proxy support and ultimately have achieved a better architecture by putting HAProxy between Mongrel and nginx. So our architecture is:

    web => nginx => haproxy => Mongrels

    What we saw earlier (before HAProxy) was that nginx would flood Mongrels with too many requests and Mongrel’s request queue was not solid and it would quickly get stuck with too many queued requests. HAProxys queue is much more stable and it better balances all the requests between backends than nginx does. nginx only offers round-robin balancing when really an algorithm like least-connections is better. I dont know if Thin suffers from the same issue(s) as Mongrel.

    In our new setup nginx just proxies to a single haproxy instance and haproxy has all registered Mongrels configured. HAProxy has better support for upstream ok/fail detection and can also limit each app server to 1 connection (maxconn directive) which is key for Mongrel, not sure about Thin.

    The maxconn directive is so key that EngineYard has a patch for nginx which makes it native to nginx, so you dont need to deploy HAProxy just to take advantage of it.

    See: nginx-ey-balancer

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 241k
  • Answers 241k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You could implement this functionality by simply storing the words… May 13, 2026 at 7:20 am
  • Editorial Team
    Editorial Team added an answer Use grep instead of Perl grep -v '@bad\.com' inputfile >… May 13, 2026 at 7:20 am
  • Editorial Team
    Editorial Team added an answer Have you tried the no-cache and expires meta-tags? Other than… May 13, 2026 at 7:20 am

Related Questions

My Company is running several international websites for selling insurance products. Our current setup
I have just setup VisualSVN on my local machine and on our server that
What is the best practice for configuring a java class library? At my work,
I've had a hard time trying to find good examples of how to manage

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.