title: php socket programming issue: Connection reset by peer
body: <p>I have an php application, which connects to a java application using sockets. In java application we have timeout set for 10 seconds. </p>
  
  <p>I have a huge amount of data which needs to be processed in the middle of the application. Due to which when i try to use the socket after processing I receive the socket error of connection reset by peer. </p>
  
  <p>Now when I try to shutdown(socket_shutdown) the connection and re open the connection, am receiving an error Transport endpoint is not connected on socket_send,socket_receive. Would appreciate any guidance on this issue.</p>
  
  <p>NOTE : am trying to use singleton method for socket connections.</p>