Nicholas
Support Dept.Some servers experience situations where the Import Tool or other background tasks would appear to hang, stop unexpectedly, and remain locked indefinitely. The issue is caused by very low PHP-FPM process limits on the hosting environment.
Many shared hosting environments, especially cPanel-based servers, configure PHP-FPM with very restrictive default settings, such as extremely low pm.max_children limits. Hosting providers do this intentionally to prevent any single customer from using too many server resources. While this works for simple websites, it often causes problems for background operations like imports or any task that takes longer than a few seconds.
When pm.max_children is too low, PHP-FPM quickly runs out of worker processes and begins terminating long-running scripts. This interrupts background tasks and can leave them in a locked or incomplete state.
To reduce server load, phpListings 1.1.0 introduced a redesigned Import Tool that:
Processes 50 listings per cycle
Sleeps for the remainder of a 2-minute window
Adapts better to limited hosting environments
However, if PHP-FPM limits are too restrictive, the underlying issue may still occur. This guide explains how to diagnose the problem, adjust PHP-FPM settings, and prevent background tasks from hanging.
PHP-FPM worker exhaustion is the cause of hanging or locked background tasks.
cPanel:
/usr/local/cpanel/logs/php-fpm/error.log
/opt/cpanel/ea-php81/root/usr/var/log/php-fpm/error.log (path varies by PHP version)
Ubuntu / Standard Linux:
/var/log/php8.x-fpm.log
/var/log/php-fpm/error.log
Look for any of the following:
server reached pm.max_children setting
pool <name> seems busy
child exited with code ...
unable to fork
If these appear around the time an import or other background task should be progressing, PHP-FPM limits are the reason.
cPanel often sets very low PHP-FPM worker limits, sometimes as low as 1 or 2 children per domain. This is insufficient for background processing.
Log in to WHM.
Go to:
Home → Software → MultiPHP Manager
Find your domain and click Manage Settings.
Increase:
pm.max_children → recommended minimum: 10
Save the changes.
Restart PHP-FPM for the PHP version in use.
If you do not have access to these settings, your hosting provider will need to adjust them for you.
Servers running PHP-FPM via apt use configuration files located at:
/etc/php/8.1/fpm/pool.d/www.conf
Open the configuration file:
sudo nano /etc/php/8.1/fpm/pool.d/www.conf
Adjust the settings:
pm = dynamic
pm.max_children = 10
pm.start_servers = 2
pm.min_spare_servers = 2
pm.max_spare_servers = 4
Restart PHP-FPM:
sudo systemctl restart php8.1-fpm
Check status:
systemctl status php8.1-fpm