Nginx php-fpm unixsocket concurrency 100 or more 502 solutions

Source: Internet
Author: User

Nginx php-fpm with the UNIX socket, when the concurrency reached more than 100 is, will report 502 errors, change to TCP mode without this problem

Originally with UNIX socket is to improve performance, but does not support large concurrency, the discovery is the system kernel limit caused by instability, modify the following kernel parameters to resolve


Adjust the following parameters sysctl.conf

Net.unix.max_dgram_qlen = 4096net.core.netdev_max_backlog = 4096net.core.somaxconn = 4096

Php-fpm.conf

Listen.backlog = 4096

Reference: http://forum.nginx.org/read.php?11,215606,215606#msg-215606

This article is from the "Zhou Failong" blog, make sure to keep this source http://zhoufayong.blog.51cto.com/866021/1636518

Nginx php-fpm unixsocket concurrency 100 or more 502 solutions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.