I have a laravel project running queued tasks to send email. The queue manager is run by supervisor so the php script is constantly in the memory until it's restarted. For sending emails I use Bronto which communicates through SOAP. They provided a php library via composer, I checked their code they use php's SoapClient class to send the request. After certain time (sometimes it's less than 30 minutes) the script starts crashing because I cannot open more tcp socket. I ran netstat on the server and it turned out that a lot of connections/sockets are still open, php doesn't close them, that's why a new one cannot be opened. Keep-alive flag is false and since the script doesn't terminate I should close those connections somehow. Any ideas would be appreciated.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire