Error 500 when switch from suPHP to FCGI
Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Cristian Beckerle
  2. Wednesday, 23 September 2015
  3.  Subscribe via email
Hello! Im trying to setup one server to use FCGI instead of suPHP. Its a shared server with 150 accounts. Every time i try i get error 500 on some sites. I check the file permissions and are ok, how can i debug this problem?

Here is a sample error from apache error_log

[Wed Sep 23 12:00:24 2015] [warn] [client 207.46.13.176] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Wed Sep 23 12:00:24 2015] [error] [client 207.46.13.176] Premature end of script headers: index.php

Thanks!
Rate this post:
  1. 23.09.2015 11:09:27
  2. # 1
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
Hi,

There should be more information in some other apache logs, most probably in suexec_log . The usual thing of such error after switching to FCGI are permissions and ownership isssues, for files and for directories.
  1. 23.09.2015 12:09:58
  2. # 2
Imagina Accepted Answer
Posts: 14
Joined: 24.10.2013
0
Votes
Undo
I'm pretty sure the problem is one of the Fcgi limits is being reached. You can add my fcgi configuration in WHM   "Apache Configuration" -> Include Editor - Pre Virtual Host Include



FcgidMaxRequestsPerProcess 500
FcgidMinProcessesPerClass 0
FcgidMaxProcessesPerClass 8
FcgidMaxProcesses 150
FcgidIdleTimeout 60
FcgidProcessLifeTime 540
FcgidIdleScanInterval 30
BusyTimeout 1500

IPCConnectTimeout 300
IPCCommTimeout 7200

Tweak it according to your needs or server.

Regards
  1. 23.09.2015 12:09:13
  2. # 3
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
Also, did you execute cagefsctl --force-update after a switch? Maybe needed binaries are not there?
  1. 23.09.2015 12:09:35
  2. # 4
Cristian Beckerle Accepted Answer
Posts: 6
Joined: 15.10.2014
0
Votes
Undo
Thanks, i looked in suexec_log and found those lines


[2015-09-23 13:41:56]: uid: (742/delsatgr) gid: (742/delsatgr) cmd: php5
[2015-09-23 13:41:56]: cannot stat program: (php5)
[2015-09-23 13:41:56]: uid: (742/delsatgr) gid: (742/delsatgr) cmd: php5
[2015-09-23 13:41:56]: cannot stat program: (php5)
  1. 23.09.2015 12:09:53
  2. # 5
Cristian Beckerle Accepted Answer
Posts: 6
Joined: 15.10.2014
0
Votes
Undo
Bogdan, it was that!!!! 

Thanks!
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.