Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

background process and problems with connection #11

Closed
rspadim opened this issue Aug 15, 2014 · 4 comments
Closed

background process and problems with connection #11

rspadim opened this issue Aug 15, 2014 · 4 comments

Comments

@rspadim
Copy link

rspadim commented Aug 15, 2014

guys when running as a background process, forever
while(1){ read emails from database; send email; disconnect; }

i get a lot of close_wait at netstat, i think it's a netsocket problem, but i changed net socket to shutdown() and fclose() the socket before close, and it persist, any idea what could we do?

check netstat running 1hour (near to 100emails), i'm using non persistent connections

[beto@xyz ~]# netstat -an | grep CLOSE_WAIT
tcp 54 0 192.168.0.5:34375 208.84.244.140:587 CLOSE_WAIT
tcp 54 0 192.168.0.5:34365 208.84.244.140:587 CLOSE_WAIT
tcp 54 0 192.168.0.5:34390 208.84.244.140:587 CLOSE_WAIT
tcp 54 0 192.168.0.5:34385 208.84.244.140:587 CLOSE_WAIT
tcp 54 0 192.168.0.5:34379 208.84.244.140:587 CLOSE_WAIT
tcp 54 0 192.168.0.5:34369 208.84.244.140:587 CLOSE_WAIT
tcp 54 0 192.168.0.5:34362 208.84.244.140:587 CLOSE_WAIT
tcp 54 0 192.168.0.5:34366 208.84.244.140:587 CLOSE_WAIT
tcp 54 0 192.168.0.5:34360 208.84.244.140:587 CLOSE_WAIT
tcp 54 0 192.168.0.5:34383 208.84.244.140:587 CLOSE_WAIT
tcp 54 0 192.168.0.5:34368 208.84.244.140:587 CLOSE_WAIT
tcp 54 0 192.168.0.5:34364 208.84.244.140:587 CLOSE_WAIT
tcp 54 0 192.168.0.5:34372 208.84.244.140:587 CLOSE_WAIT
tcp 54 0 192.168.0.5:34357 208.84.244.140:587 CLOSE_WAIT

@CloCkWeRX
Copy link
Member

#9

@rspadim
Copy link
Author

rspadim commented Sep 4, 2014

guy checking all possible shutdown/close, i think the problem is the openssl actived and streams, i don't know how to include a shutdown in stream code or if it exists when using openssl, maybe we should send this problem to php bug tracker, creating a reprodutible test case
something like connect, set crypt on, disconnect, execute this 1000 times and you have many CLOSE_WAIT

@jparise
Copy link
Member

jparise commented Sep 7, 2015

Related: pear/Net_Socket#4

@jparise
Copy link
Member

jparise commented Nov 30, 2019

There hasn't been any activity on this issue in years so I'm going to close it. Please reopen it if there's new or additional information.

@jparise jparise closed this as completed Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants