Joyce Babu
Joyce Babu

Reputation: 20654

Is PHP-FPM thread safe

I have a custom PHP module that depends on an external library that is not thread safe. Does FPM use threads or processes to handle requests? Is it safe to use a non-threadsafe php module with PHP-FPM?

Upvotes: 2

Views: 4619

Answers (1)

Joyce Babu
Joyce Babu

Reputation: 20654

I asked this question in a PHP IRC channel and was told that PHP-FPM is always non-threaded, as it makes no sense to build it as thread safe. Since each request is handled by a separate process (which is re-used) in PHP-FPM, it should be safe to use the module with PHP-FPM.

Upvotes: 4

Related Questions