We have a server running fine on a host with WHM/Cpanel.
I am trying to get a 'duplicate' test server set up so we can run optimization and upgrade tests... but without buying the whm/cpanel since we are going to ditch it when our test are finished being reviewed.
I'm finding that many people have gone through the same issues I have so I'm posting as much of the process as I can remember to make this thread a reference.
But the main purpose is I have finally hit the same point as many others where there is no posted solution. Everything is installed but the fcgid just isn't kicking in.
so on centOS
yum install httpd mod_fcgid php-cli
however, that fcgid did not work out for me, I followed these directions:
http://en.ispdoc.com/index.php/Insta...n_CentOS_Linux but I grabbed 2.3.6 (I could use 2.3.5 instead)
service httpd stop failed or httpd start cannot bind to port 80 already in use:
issue is the httpd.pid is directed to be stored in logs/httpd.pid when serivce looks for /var/run/httpd.pid
That can be fixed in the apache config by PidFile /var/run/httpd.pid
This file still is not written when the server starts, get the process id of the main thread (under root user) and write it to the file or killall httpd to shut down.
Invalid command 'x', perhaps misspelled or defined by a module not included in the server configuration:
most likely missing a module, Google "Invalid command x LoadModule" to get a list of suggested modules out of the search results.
mod_fcgid couldn't bind unix domain socket x:
permissions error on the path to the log directory where the default fcgidsock/ is. Make sure the path, both from /etc/ and /var/log is +rx for needed users.
now I am at the issue where the fcgid is not starting. On the running server I have:
root 10668 0.0 0.0 75688 9160 ? Ss Jan24 1:02 /usr/local/apache/bin/httpd -k start -DSSL
nobody 31132 0.0 0.0 75956 6412 ? S 09:09 0:00 \_ /usr/local/apache/bin/httpd -k start -DSSL
rbcorg 31249 0.0 0.0 190664 13700 ? S 09:09 0:00 | \_ /usr/bin/php
odjorg 31275 0.0 0.4 225748 75668 ? S 09:09 0:03 | \_ /usr/bin/php
rbcmin1 31692 0.6 0.8 290364 146716 ? S 09:09 0:28 | \_ /usr/bin/php
rbcmin1 31702 1.0 1.7 430000 286212 ? S 09:09 0:44 | \_ /usr/bin/php
ccourses 31735 0.6 1.7 433936 291944 ? S 09:09 0:27 | \_ /usr/bin/php
rbcorg 31737 0.0 0.3 211104 52500 ? S 09:09 0:01 | \_ /usr/bin/php
systuser 31738 0.0 0.0 191628 15304 ? S 09:09 0:00 | \_ /usr/bin/php
odjorg 32625 0.1 0.4 225484 75760 ? S 09:12 0:04 | \_ /usr/bin/php
rbcevent 32626 0.0 0.0 189876 14836 ? S 09:12 0:00 | \_ /usr/bin/php
rbcmin 32677 0.1 0.5 229956 85924 ? S 09:13 0:05 | \_ /usr/bin/php
rbcmin 32678 0.1 0.5 227796 83968 ? S 09:13 0:04 | \_ /usr/bin/php
rbcmin 12049 0.0 0.0 11036 1436 ? R 10:20 0:00 | | \_ ps auxf
nobody 5411 0.1 0.0 76504 8668 ? S 09:42 0:02 \_ /usr/local/apache/bin/httpd -k start -DSSL
nobody 5413 0.1 0.0 76512 8820 ? S 09:42 0:02 \_ /usr/local/apache/bin/httpd -k start -DSSL
nobody 5638 0.1 0.0 76524 8792 ? S 09:45 0:02 \_ /usr/local/apache/bin/httpd -k start -DSSL
etc, on the current server I have
root 7307 0.0 0.3 x y ? Ss 07:34 0:00 /usr/sbin/httpd
nobody 7309 0.0 0.1 x y ? S 07:34 0:00 /usr/sbin/httpd
nobody 7310 0.0 0.1 x y ? S 07:34 0:00 /usr/sbin/httpd
etc, but not a single php thread to indicate the fcgi daemon is active.
If the downloaded/compiled mod_fcgid is included in apache, the root thread (7307) dies after spawning the later threads (>7308) and dmesg declares segfault. (httpd[3176] segfault at 0000000047000029 rip 00002b4475e0031c rsp 00007fffda1baf40 error 4)
If the yum fcgid is included still no fcgi daemon, no segfault, but the logs are of course filled with (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
Premature end of script headers: index.php
duh, no php threads to connect to.
fcgidsock is still empty, permissions 700 (which works find in the production server, which is filled with process ID files) but I'm not getting the permission denied mod_fcgid: spawn process error + couldn't bind unix domain socket ../fcgidsock/3625 to indicate its having problems writing the files. Seems like its not trying at all now.
-------------------------
My goals:
I would prefer to use the downloaded fcgid, as that is what is running on the production, but it all goes down to a .so so not up tight about that
where else can I look for errors to determine what is wrong? with the segfault (downloaded/compiled fcgid) or threads not initiating (yum fcgid module)
Get the server up and running with php/fcgid
----------------------------
I will not accept:
Switch to mod_php, fastcgid, another kernel/flavor...
Thats not my job and the purpose is mirror the running production. I know it can be done I'm just missing a step or two from completing it.
The system is PCI compliant, its too much to just up and change the production so I can have something easier to mirror.
mod_php is not fast enough for the demand on this thing (we are maxing 16-cores, 16GB on 2 servers to support the site)
fastcgid takes too much memory, the threads were easily hitting 1GB+ if they remained active too long
-----------------
Long term goals:
test Zend server and other optimizations. I am going to take our 3GB log files at the end of the day and script a 60x thread "attack" on the test box to see how long it takes to run a full days usage through it, while reading memory usage. Then install or swap out the different optimizations such as zend community, or a trial of the paid version, mod_php, fastcgid with different configs, and run the test again.
Also snapshot the server to have a restore point, and update our php programs to see how they handle upgrades.