The code works perfectly for most of the time, only sometime it behaves like this.
I totally agree to what you are saying, But in that case there should be something in the access log saying that the 2nd cgi was hit and got a 5xx or 4xx response. Or the error log showing there was an error in the CGI. But this is not happening here, there is simply nothing in the log when the error happens.So I was just asking, is there a way/tool to find where the HTTP post request is going/breaking, as the log suggest the request did not reach the application. And the network team is saying that the connection is getting reset by the Server.