Mohammad - Sockets vs TCP

New About Yours API Help
1.1 KB, Plain text
Hi guys,

As always, thank you for the awesome work you do. Please keep it up.

I've been a FreeBSD user for 10 years now, it's my go-to OS, especially for a PHP web stack. I've been using FreeBSD, nginx, PHP, and MariaDB for a long time without any issues. Lately however, I've been facing an issue with one of my customers.

They have 3 websites which they used to run with 8 DigitalOcean Linux droplets. An nginx load balancer plus 6 nginx/PHP nodes plus a node for MySQL/Redis. I switched them over to 2 big droplets running FreeBSD and splitting things up into jails. Nginx communicates with PHP through Unix sockets (fastcgi_pass unix:/var/run/php5-fpm-site.sock;).

Everything runs smoothly except when they run a poll, they have thousands of their readers vote at the same time and I start getting connection issues like "connection failed" or "operation not permitted". Switching the connectivity between nginx and PHP to TCP (fasctcgi_pass makes the site handle much higher loads.

Knowing that nginx supports much higher traffic than what I'm getting, I guess it's an issue of a tunable.

Thanks again for everything you do.
Pasted 10 months ago — Expires in 62 days