Force Curl Timeout in PHP-FPM

Are there ways to Force a maximum timeout for PHP Curl? We use several versions of PHP-FPM in hestiacp, we want all Curl requests to not exceed a maximum of 5 seconds of time in any of the versions of PHP-FPM that we have active. What dou you recommend?

PHP’s CURL uses the php.ini setting default_socket_timeout . The default value is 60, the unit is seconds.

Change it to 5 but may cause other issues with other systems so becarefull

Thanks, and where can I find the .ini file for each version of PHP?

/etc/php/x.x/fpm/php.ini

x.x is the version

1 Like