title: How to debug TCP Connection Refused?
body: <p>I have a simple(ish) webapp benchmark setup:</p>
  
  <p>LoadGenerator -> Apache -> WebApp</p>
  
  <p>When I run my benchmarks with a few thousand test users...evertything works as expected.</p>
  
  <p>However, when I increase the number of test users to around 14k...my Apache server starts to refuse <em>some</em> connections to my LoadGenerator. CPU utilization is nowhere near capacity...and there doesnt seem to be any dropped connections from Apache to my WebApp.</p>
  
  <p>I believe I am running out of some resource on my Apache server, but I cant tell what? I thought it could be ports...but my connections arent quite high enough for that I believe.</p>
  
  <p>Next I tried looking at tcpdump info...but I really didnt see anyhting interesting. Though honestly, I just opened up the dump in Wireshark and looked for big red marks.</p>
  
  <p>Is there a way to to have the kernel output error messages in the hopse that I might see something that tells me whats happening. In a perfect world, I would see an error message like "ERROR: not enough X for number of connections".</p>
  
  <p>Any other tips you might recommend to see why my LoadGenerator keeps hitting connction refused?</p>