How is nginx and PHP-FPM operating?

Source: Internet
Author: User
Tags fpm
is Nginx and php-fpm running in multi-threaded mode?

Nginx is a non-blocking IO & IO multiplexing model that can handle requests from multiple clients in a single line thread with similar epoll functionality provided by the operating system.
Nginx process is a thread, that is, there is only one thread in each process, but this one thread can serve multiple clients.

PHP-FPM is a blocked single-threaded model that pm.max_children specifies the maximum number of processes, pm.max_requests specifying how many requests each process will have to restart (because PHP occasionally has a memory leak, so a restart is required).
PHP-FPM has only one thread per process, but a process can serve only one client at a time.

Most Linux programs tend to use processes rather than threads, because Linux is relatively inexpensive to create processes, and Linux's threading capabilities are not very powerful.


How is nginx and PHP-FPM operating?

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.