1. Identify the Problem
We observed frequent occurrences of the following error in our logs:
Code: Select all
(20014)Internal error (specific information not available): [client 95.217.144.173:33902] AH01075: Error dispatching request to : (passing brigade to output filters)
2. Adjust PHP-FPM Configuration
We modified the `pool.d` configuration file (/etc/phpX.X/fpm/pool.d/...) values related to timeouts, logging, and compression. Specifically:
Code: Select all
request_terminate_timeout = 900s
php_admin_value[max_execution_time] = 300
php_admin_value[zlib.output_compression] = off
php_admin_value[zlib.output_compression_level] = -1
php_admin_value[zlib.output_handler] =
php_admin_value[error_reporting] = off
- **max_execution_time**: Increases the maximum time a script can run before timing out.
- **zlib.output_compression**: Disabled to reduce overhead and avoid compression-related issues.
- **error_reporting**: Turned off to reduce extraneous log entries.
3. Check for Performance Improvements
After making these changes, restart PHP-FPM:
Code: Select all
systemctl restart phpX.X-fpm
4. Monitor for Additional Issues
If you perform similar changes, keep an eye on both performance metrics and error logs. Sometimes, large or complex scripts may still require further optimization or different configuration tweaks.
5. Conclusion
Fine-tuning PHP-FPM settings often helps stabilize and optimize your application, especially if you’re seeing errors or experiencing slowdowns. Adjusting parameters like `max_execution_time` and turning off zlib compression in certain cases can resolve “Internal error” messages and improve overall performance.