• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved uid: (10001/superu) gid: (503/503) cmd: cgi_wrapper Error

samyeli

New Pleskian
Hello everyone,

CentOS 6.10 (Final), Plesk OnyxVersiyon 17.8.11
Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz (12 core(s))
12 GB ram
Php 7.1.33
Mysql : 5.5.55


I regularly get the following warnings in the suexec log (suexec.log):
[2022-11-07 21:53:21]: uid: (10001/superu) gid: (503/503) cmd: cgi_wrapper
[2022-11-07 21:53:55]: uid: (10001/superu) gid: (503/503) cmd: cgi_wrapper
[2022-11-07 21:53:56]: uid: (10001/superu) gid: (503/503) cmd: cgi_wrapper
[2022-11-07 21:53:57]: uid: (10001/super) gid: (503/503) cmd: cgi_wrapper
[2022-11-07 21:54:00]: uid: (10001/super) gid: (503/503) cmd: cgi_wrapper

I'm not sure the above indicates a bug.

Also sometimes I get mod_fcgid: can't apply process slot for /var/www/cgi-bin/cgi_wrapper/cgi_wrapper error in apacehe error log. No high ram and cpu usage.

/etc/httpd/conf/httpd.conf
<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 20
ServerLimit 300
MaxClients 300
MaxRequestsPerChild 10000
</IfModule>

<IfModule worker.c>
StartServers 2
MaxClients 300
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
---------------------------
/etc/httpd/conf.d/fcgid.conf

LoadModule fcgid_module modules/mod_fcgid.so

<IfModule mod_fcgid.c>

<IfModule !mod_fastcgi.c>
AddHandler fcgid-script fcg fcgi fpl
</IfModule>

FcgidIPCDir /var/run/mod_fcgid/sock
FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm

FcgidIdleTimeout 40
FcgidProcessLifeTime 30
FcgidMaxProcesses 1000
FcgidMaxProcessesPerClass 10
FcgidMinProcessesPerClass 0
FcgidConnectTimeout 30
FcgidIOTimeout 45
FcgidInitialEnv RAILS_ENV production
FcgidIdleScanInterval 10

</IfModule>

I have reviewed many documents. I'm getting an error even though I've done a lot of things. I really couldn't find the cause of this error even though I searched all over the internet. I would be glad if you help.
 
I regularly get the following warnings in the suexec log (suexec.log):
[2022-11-07 21:53:21]: uid: (10001/superu) gid: (503/503) cmd: cgi_wrapper
[2022-11-07 21:53:55]: uid: (10001/superu) gid: (503/503) cmd: cgi_wrapper
[2022-11-07 21:53:56]: uid: (10001/superu) gid: (503/503) cmd: cgi_wrapper
[2022-11-07 21:53:57]: uid: (10001/super) gid: (503/503) cmd: cgi_wrapper
[2022-11-07 21:54:00]: uid: (10001/super) gid: (503/503) cmd: cgi_wrapper

I'm not sure the above indicates a bug.
This is not a bug. This only logs the execution events. Nothing to worry about.
 
This is not a bug. This only logs the execution events. Nothing to worry about.
Thanks peter. It's great for me to know this isn't a problem!

I actually followed the steps in the link you shared. the end is the same for me

FcgidMaxProcesses 1000
FcgidMaxProcessesPerClass 10
 
An issue was resolved when I switched from fastcgi to FPM. Thanks for everything.
Actually, this hints to the number of CGI processes again. Because in PHP via CGI mode, each script execution needs its own while in PHP-FPM mode the daemon organizes which scripts can use which slots, so in total this will occupy less.

In case you wish to continue investigation, you could check how long a script is typically running. Sometimes scripts don't terminate. They stay resident until they time out. This could cause a high number of processes. In such cases - besides optimizing the script - it can help to lower the timeout value for scripts, so that they are killed earlier to free a slot.
 
Back
Top