Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
perl fastcgi => 502-я ошибка
Добрый вечер,
Портировал свой перловый скрипт под fast-cgi, а nginx дает 502-ю.
Программа повешена, как сервер, через spawn-fcgi на сокет.
2005/04/23 11:27:12 [debug] 19512#0: *699923 write new buf t:1 f:0
08715DF4, pos 08715DF4, size: 179 file: 0, size: 0
2005/04/23 11:27:12 [debug] 19512#0: *699923 http write filter: l:0 f:0
s:179
2005/04/23 11:27:12 [debug] 19512#0: *699923 write old buf t:1 f:0
08715DF4, pos 08715DF4, size: 179 file: 0, size: 0
2005/04/23 11:27:12 [debug] 19512#0: *699923 write new buf t:0 f:0
00000000, pos 0808E6C0, size: 116 file: 0, size: 0
2005/04/23 11:27:12 [debug] 19512#0: *699923 write new buf t:0 f:0
00000000, pos 0808E1A0, size: 53 file: 0, size: 0
2005/04/23 11:27:12 [debug] 19512#0: *699923 http write filter: l:1 f:0
s:348
2005/04/23 11:27:12 [debug] 19512#0: *699923 writev: 348
2005/04/23 11:27:12 [debug] 19512#0: *699923 http write filter 00000000
2005/04/23 11:27:12 [debug] 19512#0: *699923 http finalize request: 0
2005/04/23 11:27:12 [debug] 19512#0: *699923 set http keepalive handler
2005/04/23 11:27:12 [debug] 19512#0: *699923 http close request
2005/04/23 11:27:12 [debug] 19512#0: *699923 http log handler
2005/04/23 11:27:12 [debug] 19512#0: *699923 free: 087159B8, unused: 6493
2005/04/23 11:27:12 [debug] 19512#0: *699923 event timer add: 144: 639205
2005/04/23 11:27:12 [debug] 19512#0: *699923 hc free: 00000000 0
2005/04/23 11:27:12 [debug] 19512#0: *699923 hc busy: 00000000 0
2005/04/23 11:27:12 [debug] 19512#0: *699923 http keepalive handler
2005/04/23 11:27:12 [debug] 19512#0: *699923 recv: fd:144 -1 of 2048
2005/04/23 11:27:12 [debug] 19512#0: *699923 recv() not ready (11:
Resource temporarily unavailable)
2005/04/23 11:27:17 [debug] 19512#0: *699923 http empty handler
2005/04/23 11:27:17 [debug] 19512#0: *699923 http keepalive handler
2005/04/23 11:27:17 [debug] 19512#0: *699923 recv: fd:144 488 of 2048
2005/04/23 11:27:17 [debug] 19512#0: *699923 malloc: 086DB920:8192
2005/04/23 11:27:17 [debug] 19512#0: *699923 http process request line
2005/04/23 11:27:17 [debug] 19512#0: *699923 http request line: "GET
/test/index.phtml HTTP/1.1"
2005/04/23 11:27:17 [debug] 19512#0: *699923 http uri: "/test/index.phtml"
2005/04/23 11:27:17 [debug] 19512#0: *699923 http args: ""
2005/04/23 11:27:17 [debug] 19512#0: *699923 http exten: "phtml"
2005/04/23 11:27:17 [debug] 19512#0: *699923 http process request header
line
2005/04/23 11:27:17 [debug] 19512#0: *699923 http header: "Host: domain.com"
2005/04/23 11:27:17 [debug] 19512#0: *699923 http header: "User-Agent:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050310
Firefox/1.0.1"
2005/04/23 11:27:17 [debug] 19512#0: *699923 http header: "Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5"
2005/04/23 11:27:17 [debug] 19512#0: *699923 http header:
"Accept-Language: en-us,en;q=0.5"
2005/04/23 11:27:17 [debug] 19512#0: *699923 http header:
"Accept-Encoding: gzip,deflate"
2005/04/23 11:27:17 [debug] 19512#0: *699923 http header:
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"
2005/04/23 11:27:17 [debug] 19512#0: *699923 http header: "Keep-Alive: 300"
2005/04/23 11:27:17 [debug] 19512#0: *699923 http header: "Connection:
keep-alive"
2005/04/23 11:27:17 [debug] 19512#0: *699923 http header: "Cookie:
partner=pots; TRACKID=f11f1c49be510cf1947e8bc66dacdbd3"
2005/04/23 11:27:17 [debug] 19512#0: *699923 http header done
2005/04/23 11:27:17 [debug] 19512#0: *699923 server name: domain.com
2005/04/23 11:27:17 [debug] 19512#0: *699923 event timer del: 144: 639205
2005/04/23 11:27:17 [debug] 19512#0: *699923 uri changes: 11
2005/04/23 11:27:17 [debug] 19512#0: *699923 find location
2005/04/23 11:27:17 [debug] 19512#0: *699923 find location: "/"
2005/04/23 11:27:17 [debug] 19512#0: *699923 find location: "/test"
2005/04/23 11:27:17 [debug] 19512#0: *699923 find location: ~
"^.+\.(jpg|jpeg|gif|mpg|mpeg|wmv|avi|png|css|ico|txt)$"
2005/04/23 11:27:17 [debug] 19512#0: *699923 http cl:-1 max:1048576
2005/04/23 11:27:17 [debug] 19512#0: *699923 http init upstream, client
timer: 0
2005/04/23 11:27:17 [debug] 19512#0: *699923 epoll add connection:
fd:163 ev:80000005
2005/04/23 11:27:17 [debug] 19512#0: *699923 connect to
unix:/usr/local/fastcgi/perl-fcgi, #699938
2005/04/23 11:27:17 [debug] 19512#0: *699923 connected
2005/04/23 11:27:17 [debug] 19512#0: *699923 http upstream connect: 0
2005/04/23 11:27:17 [debug] 19512#0: *699923 http upstream send request
2005/04/23 11:27:17 [debug] 19512#0: *699923 chain writer buf size: 1032
2005/04/23 11:27:17 [debug] 19512#0: *699923 chain writer in: 086DC2E8
2005/04/23 11:27:17 [debug] 19512#0: *699923 writev: 1032
2005/04/23 11:27:17 [debug] 19512#0: *699923 chain writer out: 00000000
2005/04/23 11:27:17 [debug] 19512#0: *699923 event timer add: 163: 749892
2005/04/23 11:27:17 [debug] 19512#0: *699923 http upstream dummy handler
2005/04/23 11:27:17 [debug] 19512#0: *699923 http upstream dummy handler
2005/04/23 11:27:17 [debug] 19512#0: *699923 http upstream dummy handler
2005/04/23 11:27:17 [debug] 19512#0: *699923 http upstream process header
2005/04/23 11:27:17 [debug] 19512#0: *699923 malloc: 08763988:32768
2005/04/23 11:27:17 [debug] 19512#0: *699923 recv: fd:163 240 of 32768
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: 01
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: 07
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: 00
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: 01
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: 00
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: E0
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: 00
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: 00
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record length: 224
2005/04/23 11:27:17 [error] 19512#0: *699923 FastCGI sent in stderr:
"[Sat Apr 23 11:27:17 2005] index.phtml: Use of uninitialized value in
pattern match (m//) at (eval 6) line 3.
[Sat Apr 23 11:27:17 2005] index.phtml: Use of uninitialized value in
transliteration (tr///) at (eval 6) line 4" while reading response
header from upstream, client: 192.168.1.8, server: domain.com, URL:
"/test/index.phtml", upstream:
fastcgi://unix:/usr/local/fastcgi/perl-fcgi://index.phtml, host:
"domain.com"
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: 01
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: 07
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: 00
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: 01
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: 00
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: 00
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: 00
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: 00
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record length: 0
2005/04/23 11:27:17 [debug] 19512#0: *699923 http upstream dummy handler
2005/04/23 11:27:17 [debug] 19512#0: *699923 http upstream process header
2005/04/23 11:27:17 [debug] 19512#0: *699923 recv: fd:163 5072 of 32528
2005/04/23 11:27:17 [debug] 19512#0: *699923 http fastcgi record byte: 06
2005/04/23 11:27:17 [error] 19512#0: *699923 upstream sent unsupported
FastCGI protocol version: 6 while reading response header from upstream,
client: 192.168.1.8, server: domain.com, URL: "/test/index.phtml",
upstream: fastcgi://unix:/usr/local/fastcgi/perl-fcgi://index.phtml,
host: "domain.com"
2005/04/23 11:27:17 [debug] 19512#0: *699923 http next upstream, 8
2005/04/23 11:27:17 [debug] 19512#0: *699923 finalize http upstream
request: 502
2005/04/23 11:27:17 [debug] 19512#0: *699923 finalize http fastcgi request
2005/04/23 11:27:17 [debug] 19512#0: *699923 close http upstream
connection: 163
2005/04/23 11:27:17 [debug] 19512#0: *699923 event timer del: 163: 749892
2005/04/23 11:27:17 [debug] 19512#0: *699923 http finalize request: 502
2005/04/23 11:27:17 [debug] 19512#0: *699923 http set discard body
2005/04/23 11:27:17 [debug] 19512#0: *699923 HTTP/1.1 502 Bad Gateway
Server: nginx/0.1.28
Date: Sat, 23 Apr 2005 15:27:17 GMT
Content-Length: 173
Content-Type: text/html
Connection: keep-alive
Keep-Alive: timeout=20
Кусок скрипта:
my $request = FCGI::Request();
......
while ($request->Accept() >= 0)
{
&main();
}
С Уважением,
Дмитрий.
|