503 Service Unavailable - while setting up Perl FastCGI

#1
Hi,

I'm trying to set up this minimal Perl FastCGI script in the DEFAULT vhost directory but I'm getting 503 Service Unavailble errors:

#!/usr/bin/perl

use FCGI;

$ENV{FCGI_SOCKET_PATH} = "UDS://tmp/myfcgi.sock";
$ENV{FCGI_LISTEN_QUEUE} = 100;

$count = 0;

while(FCGI::accept() >= 0) {
print("Content-type: text/html\r\n\r\n",
"<title>FastCGI Hello! (Perl)</title>\n",
"<h1>FastCGI Hello! (Perl)</h1>\n",
"Request number ", $++count,
" running on host $ENV('SERVER_NAME')");
}

When I turn on the DEGUG level to HIGH I see this in the error log:

2005-02-15 06:52:34.373 [DEBUG] [127.0.0.1:40300-1] New request:
Method=[GET], URI=[/hello2.pl],
QueryString=[]
Content Length=0
2005-02-15 06:52:34.373 [DEBUG] [127.0.0.1:40300-1] HttpIOLink::suspendRead()...
2005-02-15 06:52:34.373 [DEBUG] [127.0.0.1:40300-1] processContextPath() return 0
2005-02-15 06:52:34.373 [DEBUG] [127.0.0.1:40300-1] run fcgi processor.
2005-02-15 06:52:34.373 [DEBUG] [127.0.0.1:40300-1:fcgi] [ExtConn] reconnect()
2005-02-15 06:52:34.373 [DEBUG] [127.0.0.1:40300-1:fcgi] connection to [UDS://tmp/lshttpd/myfcgi.sock] on request #0, error: No su
ch file or directory!
2005-02-15 06:52:34.373 [DEBUG] [127.0.0.1:40300-1:fcgi] [ExtConn] reconnect()
2005-02-15 06:52:34.373 [DEBUG] [127.0.0.1:40300-1:fcgi] connection to [UDS://tmp/lshttpd/myfcgi.sock] on request #0, error: No su
ch file or directory!
2005-02-15 06:52:34.373 [DEBUG] [127.0.0.1:40300-1:fcgi] HttpIOLink::continueWrite()...
2005-02-15 06:52:34.373 [DEBUG] [127.0.0.1:40300-1:fcgi] write resumed!
2005-02-15 06:52:34.373 [DEBUG] [127.0.0.1:40300-1:fcgi] processNewReq() return 0.
2005-02-15 06:52:34.373 [DEBUG] [127.0.0.1:40300-1:fcgi] readToHeaderBuf() return 0.
2005-02-15 06:52:34.373 [DEBUG] [127.0.0.1:40300-1:fcgi] HttpIOLink::handleEvents() events=4!
2005-02-15 06:52:34.373 [DEBUG] [127.0.0.1:40300-1:fcgi] HttpIOLink::suspendWrite()...
2005-02-15 06:52:34.373 [DEBUG] [127.0.0.1:40300-1:fcgi] HttpConnection::sendHttpError(),code=503 Service Unavailable


I've set these server-level parameters for the "External Application":
Name test
Address UDS://tmp/lshttpd/myfcgi.sock
Max Connections 20
Environment
Initial Request Timeout (secs) 20
Retry Timeout (secs) 0
Response Bufferring No
Auto Start No
Command
Back Log 50
Instances 4
Priority 2


Any ideas?

Thanks


Niigel
 

mistwang

LiteSpeed Staff
#2
Nigel,

You should set "Auto Start" to "yes" unless it is started by another application and binding to the socket address in the configuration.

"Instances" should matches "Max connections".

And make sure FCGI.pm is installed on that machine.

Best Regards,
George Wang
 
Top