Symptoms
When trying to upgrade or uninstall the ea-apache24-mod_fcgid script on web servers with a large amount of concurrent traffic, you see the package manager errors with the following messages indicating the argument list for the preuninstall script is too long:
/var/tmp/rpm-tmp.mOxrsB: line 1: /usr/bin/rm: Argument list too long
error: %preun(ea-apache24-mod_fcgid-2.3.9-13.20.11.cpanel.x86_64) scriptlet failed, exit status 126
error: ea-apache24-mod_fcgid-2.3.9-13.20.11.cpanel.x86_64: erase failed
/var/tmp/rpm-tmp.3VGxrt: line 1: /usr/bin/rm: Argument list too long
error: %preun(ea-apache24-mod_fcgid-2.3.9-13.20.10.cpanel.x86_64) scriptlet failed, exit status 126
error: ea-apache24-mod_fcgid-2.3.9-13.20.10.cpanel.x86_64: erase failed
Description
This can happen when there are thousands of socket files within the /run/mod_fcgid directory which leads to the system ARG_MAX limit being reached due to glob expansion.
We've opened an internal case for our development team to investigate this further. For reference, the case number is CPANEL-50262. Follow this article to receive an email notification when a solution is published in the product.
Workaround
This can be worked around by removing the files within the /run/mod_fcgid directory manually then updating/removing the packages as needed.