[proxy:error] and [proxy_fcgi:error]
I’m running on AlmaLinux 9 + EasyApache 4 + PHP 8.3 – Apache running on mod_mpm_event
mod_proxy and mod_proxy_fcgi are installed.
CPU is running exhausted all the time and –top- shows pool:fcgi that are currently running are responsible for that.
Checking server log I can see lots of [proxy:error] and [proxy_fcgi:error] like those:
[proxy:error] [pid xxxxxx:tid xxxxxx] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /opt/cpanel/ea-php83/root/usr/var/run/php-fpm/filekeycode1234567.sock (mydomain.com:8000) failed
[proxy_fcgi:error] [pid 602511:tid 602535] [client some IP:0] AH01079: failed to make connection to backend: mydomain.com
[proxy_fcgi:error] [pid xxxxxx:tid xxxxxx] (104)Connection reset by peer: [client some IP] AH01075: Error dispatching request to :
[proxy_fcgi:error] [pid xxxxxx:tid xxxxxx] [client some IP:0] AH01067: Failed to read FastCGI header
Some findings:
- The file /opt/cpanel/ea-php83/root/usr/var/run/php-fpm/filekeycode1234567.sock does exist but it’s blank (0 Bytes)
- File /etc/apache2/conf.d/includes/pre_main_global.conf also exists but it’s blank (0 Bytes)
-
Just some piece of extra information.
I've notived I have both mod_cgid and mod_fcgid. I believe I should have only mod_fcgid installed but EasyApache4 doesn't let me to uninstall mod_cgid and says mod_mpm_event will be uninstalled as well. Even if try to proceed with that, provision list at the end says nothing will be chanced.
0 -
Thanks for your comments quietFinn
Despite some similarities, I don’t think it’s the same issue as the thread you mentioned.
I’m already running with LSAPI as PHP manipulator and despite of have load, websites are always running (deadly slow but running) and nothing chances if restart PHP_FPM.
One thing I’ve noticed, Apache is not restarting by itself but when I do that manually, even if I chose gracefully it does hard reboot, probably because such heavy load ruuning.
This is a VPS server 3 CPU cores 4Gb Ram – aprox. 1Gb reserved for server apps and Opcache. Despite of such heavy load, always shows me I have about 50% free memory.
Under this server, I have only 3 WordPress websites in 3 different domains. Considering traffic I can say 2 of those have very low traffic and only one of those could vary about 10k page impression per day.
Global FPM and Apache settings:
Max Request Workers = 150
Server Limit = 256
Max Connections Per Child = 10000
Max Keep-Alive Requests = 100
pm = ondemand
pm.start_servers = 10
pm.max_children = 50
pm.min_spare_servers = 10
pm.max_spare_servers = 35
pm.max_requests = 500
Per domains (yaml) settings:
#1 Domain (higher traffic)
pm = ondemand
pm.max_children = 30
pm.max_requests = 300
#2 Domain (lower traffic)
pm = ondemand
pm.max_children = 15
pm.max_requests = 100
#3 Domain (lower traffic)
pm = ondemand
pm.max_children = 15
pm.max_requests = 100
0 -
What if you let PHP use a bit more RAM? More things in cache = more RAM use, but also faster loading so Apache doesn't have to handle as much?
0 -
It’s seems my problem is deeper than I thought.
I couldn’t keep server working this way, as websites are alive, so I turned FPM off and decide to use same old cgi + lsapi.
Atop shows now lsapi processes are responsible for such CPU high usage.
It seems FPM wasn’t ok due to extreme CPU load and probably something else as now lsapi processes are showing up on top.
I’m afraid, lsapi is even the responsible for that and it’s been showed on top for the same reason, high CPU load.
Any idea how to track the origin of that?
0 -
If there are general load issues on the machine it might be best to work through this guide:
https://support.cpanel.net/hc/en-us/articles/360056001894-How-to-diagnose-high-server-loads
If you can determine where specifically the resource usage is coming from (a specific site? a server bottlneck?) we may be able to recommend something more targeted to resolve the issue.
0 -
Hi cPRex,
, thanks for pointing me this guide and for as Newbie I am on this, it was pretty helpful. So I’m putting everything under such microscope.
So far, all I found weird so far and SSL/TLS config page blank (I’ve opened a different thread here about it)
Memory use is fairly OK.
%idle average about 75%, perhaps reducing MaxRequestWorkers (currently at 35), I can see some improvement. But not sure.
%iowait for the period I’ve been motoring , not higher than 5.
Iotop shows me the higher valueas are related to mysqld but never higher that 1M/s
I’ve setup MySQL slow log for 2 sec and error log only show below and I believe is a good thing.
/usr/sbin/mysqld, Version: 8.0.43 (MySQL Community Server - GPL). started with:
Tcp port: 3306 Unix socket: /var/lib/mysql/mysql.sock
Time Id Command Argument
The only thing I’ve missed on that tutorial was a guide to investigate MySQL, there was only a guide about query_cache but it’s not valid for MySQL 8 which I’m running.
%steal average arounds 10% and I can see some 15% spikes eventually. Should it be acceptable, or should I get into an argument with the host? Actually, I’ve already fighting with them…. Lol….
0 -
Is the overall sever load high? Are you seeing slow responses from the sites or the database? If not, it could be that you're just seeing the normal baseline for your machine.
When you say the CPU is exhausted all the time, what numbers are you using to determine that? The latest batch of data you posted seems pretty good to me.
0 -
Actually, right after you pointed the diagnose link, I decided to uninstall everything I wasn't using and just keep the basics for domains keeping working. Even removed FPM and let LSAPI wth CGI only.
After that I run /scripts/upcp --force to make sure everything was ok, logs about upgrading showed some files needed to be upgraded and finally I could get decent results.
Now average load is farily close to 1.00, some spikes here and there but nothing weird like before when I had 4.00 - 5.00 average that's high for 3 cores.
I think (not sure yet ... lol...) but I think I'm on the right way.
0 -
That definitely sounds like progress in the right direction!
0
Please sign in to leave a comment.
Comments
10 comments