Topic: Using pthreads with php-fpm
Hi all,
I'm creating a solution in PHP where a script will execute potentially hundreds of SNMP queries in order to build a single report for the end user. Often these SNMP queries will timeout and this is what I want to report on. It's currently going through an array of hosts and performing this task sequentially but it's very slow.
I saw pthreads and it seemed like a viable solution to do this in parallel. Unfortunately, I am running a Nginx w/ PHP-FPM setup and I found ZTS was required to use the pthread module. Is there any reason why PHP-FPM and ZTS don't go together? Is there an alternative (potentially better solution) within PHP I should be using or should I consider raising the request as an external python script or so (perhaps run and email enduser)
Using php-fpm from remi-php70 repo on Centos 7.2