zendtech / ZendOptimizerPlus

Other
914 stars 142 forks source link

pfsockopen - when using opcache ,pfsockopen returns empty when server initiative to disconnect the current connection #226

Closed lizhibin205 closed 7 years ago

lizhibin205 commented 8 years ago

The first request with strace: sendto(11, "POST /users/api.php HTTP/1.1\r\nHo"..., 860, MSG_DONTWAIT, NULL, 0) = 860 poll([{fd=11, events=POLLIN|POLLPRI|POLLERR|POLLHUP}], 1, 0) = 0 (Timeout) poll([{fd=11, events=POLLIN|POLLERR|POLLHUP}], 1, 3000) = 1 ([{fd=11, revents=POLLIN}]) recvfrom(11, "HTTP/1.1 200 OK\r\nServer: openres"..., 8192, MSG_DONTWAIT, NULL, NULL) = 1102

And after a few mintue anthor request with strace sendto(11, "POST /users/api.php HTTP/1.1\r\nHo"..., 860, MSG_DONTWAIT, NULL, 0) = 860 poll([{fd=11, events=POLLIN|POLLPRI|POLLERR|POLLHUP}], 1, 0) = 1 ([{fd=11, revents=POLLIN}]) recvfrom(11, "", 1, MSG_PEEK, NULL, NULL) = 0 poll([{fd=11, events=POLLIN|POLLERR|POLLHUP}], 1, 3000) = 1 ([{fd=11, revents=POLLIN}]) recvfrom(11, "", 8192, MSG_DONTWAIT, NULL, NULL) = 0

However when i use fsockopen(or whitout opcache), it won't occur this problem my php version is 5.4.41

lizhibin205 commented 7 years ago

It seems to just have a relationship with the memcached!