900+ connections in CLOSE_WAIT

346 views
Skip to first unread message

skiedude

unread,
Jun 1, 2018, 12:31:45 PM6/1/18
to Guzzle - PHP HTTP client and REST client framework
I use guzzlehttp client 6 in a laravel site that makes API requests to gather data. 

I looked at the output of `netstat -peanut` and found I have over 900 connections in CLOSE_WAIT, is this normal?

I have 2000+ users, and update each user on a 3 hour schedule. So each user that runs through will make a new instance of the guzzle client to make its requests, I just assumed once the script was done running it would close.

Is there a specific operation I need to be running at the end to make sure the connection is closed?

Tiago Guirado

unread,
Jun 1, 2018, 1:15:18 PM6/1/18
to Guzzle - PHP HTTP client and REST client framework
Are you using

$reponse->getBody()->close();

?

Jake Zufelt

unread,
Jun 1, 2018, 1:22:16 PM6/1/18
to guz...@googlegroups.com
I am not, but I hunted it down to being connections that died on an exception, I use it with laravel, and it looks like the laravel worker keeps it in close_wait until I restart the queue. So guess its not an issue with guzzle persay

--
You received this message because you are subscribed to the Google Groups "Guzzle - PHP HTTP client and REST client framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to guzzle+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages