Hello all:
I've been expirementing with moving my Lua code into uWSGI and found a
few problems with the plugin.
1) uWSGI expects the loaded Lua code to return a function, which is
then called to handle the request. Both Xavante and the standard
FastCGI handler expect the loaded code to return a table, which
contains a function called 'run'. At the minimum this difference
should be documented.
2) The first request received after uWSGI starts up works fine, but
every response after that is corrupt. nginx supplies the following in
it's logs when this happens:
2012/07/02 22:59:27 [error] 25951#0: *78017 upstream sent neither valid
HTTP/1.0 header nor "Status" header line while reading response header
from upstream, client: 10.101.153.63, server: www.example.com, request:
"GET /fin/ HTTP/1.1", upstream: "uwsgi://127.0.0.1:9002", host:
"www.example.com"
While uWSGI says (first line successful, the second a failure):
[pid: 19487|app: -1|req: -1/1] 10.101.153.63 () {38 vars in 727 bytes}
[Mon Jul 2 22:59:26 2012] GET /fin/ => generated 1196 bytes in 5 msecs
(HTTP/1.1 200) 2 headers in 66 bytes (0 switches on core 0)
[pid: 19487| app: -1|req: -1/2] 10.101.153.63 () {38 vars in 727 bytes}
[Mon Jul 2 22:59:27 2012] GET /fin/ => generated 1196 bytes in 0 msecs
(HTTP/1.1 200) 2 headers in 66 bytes (0 switches on core 0)
I've been using version 1.2.3 on NetBSD/amd64, and building with the
supplied Lua configuration.
Here's the output of --show-config.
;uWSGI instance configuration
[uwsgi]
ini = /etc/uwsgi.conf
socket = 127.0.0.1:9002
ftok = /etc/uwsgi.conf
vacuum = true
pidfile = /var/run/uwsgi.pid
lua = ./app.lua
show-config = true
;end of configuration
--
Aaron B. <[email protected]>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi