php - connection reset by peer in java -
scenario:-
client application - javascript based
front-end processing - php hosted on apache using xampp(php 5.3.8, xampp 1.7.7, apache 2.2.21)
back-end processing - java rest apis hosted on tomcat
description
browser send post data php server , php validate , modifies post data according it's need , open connection back-end server(tomcat server hosting jersey rest apis) using curl , tomcat server return response php in-return sent browser.
problem facing :-
tomcat server takes 3 10 min process request(depending on payload , type of request, higher payload more more execution time). when higher payload request or time-taking request (7-10 mins) api called socket exception occurs stating "connection reset peer" @ tomcat hosted rest apis (backend). nothing happens @ front-end processing php logic. connection reset java rest api cannot send response , there nothing happening on php cannot course-correct happening.
now, if same time-consuming or payload wise api call made through rest client (chrome extension) apis processes , return response rest client. zeroes down issue on php or apache front.
already tried: in httpd-default.conf -
keepalive on
timeout 2100
keepalivetimeout 2100
in php curl call -
curl_setopt($ch, curlopt_timeout,0); curl_setopt($ch, curlopt_connecttimeout ,20); or curl_setopt($ch, curlopt_connecttimeout ,20); curl_setopt($ch, curlopt_httpheader, array('content-type: application/json ', 'content-length: '.$len,//length of content 'connection: keep-alive', 'keep-alive: 2100')); set_time_limit(0);
xdebug turned off default_socket_timeout = 2100
and have played lots of combination, no successful result.
note - there nothing in apache , php log file or exception occurring in php script cannot drill down issue coming.
edit:
i have noticed ajax not getting error, keep on waiting ever. if apache resetting connection ajax should receive connection reset error.
Comments
Post a Comment