rryqszq4 / ngx-php

ngx-php - Embedded php7 or php8 scripting language for nginx module. Mainline development version of the ngx-php.
BSD 2-Clause "Simplified" License
642 stars 55 forks source link

[Question] Ngx-php internally use forks or threads ? #148

Closed joanhey closed 1 year ago

joanhey commented 1 year ago

Hi, I think that use threads, but I'll be sure.

Thank you.

rryqszq4 commented 1 year ago

@joanhey It internally not use multi-thread. It's multi-process and one thread in per-process, because nginx is use multi-process . So php handle request one by one in pre-process of nginx.

joanhey commented 1 year ago

So every ngx-php is a fork, and only process 1 req at a time.

rryqszq4 commented 1 year ago

So every ngx-php is a fork, and only process 1 req at a time.

Yes, sure that.