tiff2342

Well-Known Member
Apr 20, 2012
140
0
66
cPanel Access Level
Root Administrator
is there a way when using fcgid to change php prirorty when they are spawned? cant it be done inw rapper script?

what about apache?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Could you explain why you need to change the priority and what you need to change them to for PHP and Apache?
 

tiff2342

Well-Known Member
Apr 20, 2012
140
0
66
cPanel Access Level
Root Administrator
I would like php (fcgid mode) and apache to have a -2 for example priority so they have a higher run level over everything else running
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
The file that can be used for changing priority levels is /etc/security/limits.conf file, but it requires the following for changing the nice level:

Code:
username hard|soft priority #
Here username is the USER field in top, hard is a hard priority while soft is a soft priority, and # is the value for the priority.

The issue is that httpd is initiated as root user and then runs as nobody. If you try to set the level for nobody, it doesn't work and, if you set the level for root, it's going to basically impact all root processes.

As for FCGI, I don't see any available options for this on the Apache directives page for it:

https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html

I'm not saying it isn't possible to do it, but I am saying I cannot see a way currently that what you are wanting to achieve could be done.
 

tiff2342

Well-Known Member
Apr 20, 2012
140
0
66
cPanel Access Level
Root Administrator
Thanks. I figured as much. I knew the big issue was due to services running as root ;/

The file that can be used for changing priority levels is /etc/security/limits.conf file, but it requires the following for changing the nice level:

Code:
username hard|soft priority #
Here username is the USER field in top, hard is a hard priority while soft is a soft priority, and # is the value for the priority.

The issue is that httpd is initiated as root user and then runs as nobody. If you try to set the level for nobody, it doesn't work and, if you set the level for root, it's going to basically impact all root processes.

As for FCGI, I don't see any available options for this on the Apache directives page for it:

https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html

I'm not saying it isn't possible to do it, but I am saying I cannot see a way currently that what you are wanting to achieve could be done.