This article is now available in our new Knowledge Base: IBM i Apache error logs show:  A remote host refused an attempted connection operation
An error similar to this appears in the Apache error log:
[error] Can not connect() to /usr/local/zendsvr6/bin/php-cgi.bin (0.0) -  A remote host refused an attempted connect operation.
Any version of Zend Server for IBM i running on any supported version of IBM i.
Apache 3425 errors indicate a problem receiving a response from the end user browser. This can happen if, for example, the user navigates away from the page while it is still downloading, often because the page contains a large graphic or PDF, or some other large content, or runs a long running query. It might also happen if the page stops downloading for a time because some file needed from the IFS is locked. The browser may time out waiting for the content. It may also happen if the page has a form button that the user can click repeatedly if they become impatient waiting for the page to load.
This message is usually treated as a warning. The user will try the page again and hopefully wait for the content. To reduce the occurrences of these messages, check your Events for long running scripts and work on making them run faster. For example, if there is a long running query, consider reworking the query to only pull the needed records, and make sure there is a Logical FIle with an access path that can help speed up the query. For large file downloads, see if you can compress the file for faster downloading.
Also, if your forms have an entry button that can be clicked multiple times, please disable the button after the first click. There are a number of ways to do this. Search Google for the phrase 'disable duplicate form submission' to see many examples. If you see a lot of php timeout errors on the session_start() function, this could be your issue.
There was an old issue that could cause FastCGI to hang up if the browser used was Internet Explorer. The log would show the 3425 error paired with a 3447 error, and these message pairs would show up repeatedly, leading to a FastCGI hang up requiring a restart of Apache. The PTF that fixes this has been available for a long time, but you can verify that you have it applied or superceded:
FASTCGI - socket fix (fix hang remote side closes - Windows IE Explorer) (57xx999)
5.4 - MF53779
5.4.5 - MF53780
6.1.0 - MF53775
6.1.1 - MF53781
7.1 - MF53782