keepalive snippets

How to fix "(103)Software caused connection abort: proxy: pass request body"

Tagged apache, unicorn, proxypass, keepalive  Languages apacheconf

If you find this in your Apache error logs:

[error] (103)Software caused connection abort: proxy: pass request body failed to (                                                                           
[error] proxy: pass request body failed to ( from ()

Make sure you have read the Apache manuals

Also read the "BalancerMember parameters" and "Balancer parameters" sections, e.g. maxattempts.

Relevant settings to test with your application and configuration might be:

SetEnv proxy-sendchunked 1
SetEnv proxy-sendchunks 1

SetEnv downgrade-1.0 1
SetEnv proxy-sendcl 1

It all depends on where Apache is sending the requests and what features the backend supports.

If you're using Unicorn with e.g. Rails then read:

Unicorn doesn't support nokeepalive for a reason, so maybe you should switch to Rainbows!, thin and/or nginx.

If changing the server you use is not an option, you could try:

SetEnv force-proxy-request-1.0 1
  SetEnv proxy-nokeepalive 1

or e.g.:

BalancerMember xxx keepalive=Off maxattempts=2

If you have issues with large file uploads and unicorn, this might help.