tags:

views:

489

answers:

1

I'm maintaining web server software on which users can deploy web applications. Web applications run as separate processes: the web server launches a web application process, forwards the HTTP request to the web application, and forwards the web application's response back to the HTTP client. The communication between the web server and the web application happens through sockets.

Some users (= web application developers) report that they occasionally get mysterious EIO errors when they write to the socket that connects their web application to the web server (at least, they think it's writing to the socket that causes the error). Some others report that they get this error as well when writing something to STDERR (which is redirected to a log file). Restarting the web server and the web application "fixes" this problem for a short period of time.

What does EIO mean? I know the manual says "Input/output error" but this description is as vague as it can get. Under what circumstances can it occur and how is it different from ECONNREFUSED/EPIPE/ENOTCONN/etc?

+1  A: 

Well, apparently EIO can occur when trying to write to a disconnected console device.

Hongli
Furthermore, this behavior only occurs on Linux, not on OS X.
Hongli