I am using lighttpd to proxy to ruby-on-rails/mongrel, and have been seeing this message frequently in my error logs:
2006-12-14 09:39:31: (mod_proxy.c.659) unexpected end-of-file (perhaps the proxy process died): 9 Resource temporarily unavailable
Upon further investigation it appears this is due to mod_proxy abandoning a non-blocking read on the proxy backend socket after a return of EAGAIN. I patched the server to wait for one second and then retry the read (up to three times). So far it has never needed to retry more than one time, and the 500s are gone. It's a crude solution (non-configurable, and waits for a whole second) but it beats returning a bunch of 500s.
Platform details:
SunOS 91970-AA 5.11 snv_43 i86pc i386 i86pc
lighttpd-1.4.11 - a light and fast webserver