I'm having a weird issue with the XSLT module in nginx: after some random time, requesting an XSLT-transformed URL generates 500-errors. The errorlog tells me that the XML-document is not well formed, which it is.
It seems to be similar to an issue raised on the Russian maillinglist (http://www.lexa.ru/nginx-ru/msg25325.html ), although I'm not using FastCGI but just use static XML files as input for the XSLT-engine.
Running an strace or debugging with http_debug doesn't show anything weird as far as I can tell:
[code]
2009/07/16 21:49:34 [debug] 16452#0: *65 http cl:-1 max:1048576
2009/07/16 21:49:34 [debug] 16452#0: *65 generic phase: 2
2009/07/16 21:49:34 [debug] 16452#0: *65 post rewrite phase: 3
2009/07/16 21:49:34 [debug] 16452#0: *65 generic phase: 4
2009/07/16 21:49:34 [debug] 16452#0: *65 generic phase: 5
2009/07/16 21:49:34 [debug] 16452#0: *65 access phase: 6
2009/07/16 21:49:34 [debug] 16452#0: *65 access phase: 7
2009/07/16 21:49:34 [debug] 16452#0: *65 post access phase: 8
2009/07/16 21:49:34 [debug] 16452#0: *65 content phase: 9
2009/07/16 21:49:34 [debug] 16452#0: *65 open index "/var/www/allyourbass.org/htdocs/index.xml"
2009/07/16 21:49:34 [debug] 16452#0: *65 internal redirect: "/index.xml?"
2009/07/16 21:49:34 [debug] 16452#0: *65 http cl:-1 max:1048576
2009/07/16 21:49:34 [debug] 16452#0: *65 generic phase: 2
2009/07/16 21:49:34 [debug] 16452#0: *65 post rewrite phase: 3
2009/07/16 21:49:34 [debug] 16452#0: *65 generic phase: 4
2009/07/16 21:49:34 [debug] 16452#0: *65 generic phase: 5
2009/07/16 21:49:34 [debug] 16452#0: *65 access phase: 6
2009/07/16 21:49:34 [debug] 16452#0: *65 access phase: 7
2009/07/16 21:49:34 [debug] 16452#0: *65 post access phase: 8
2009/07/16 21:49:34 [debug] 16452#0: *65 content phase: 9
2009/07/16 21:49:34 [debug] 16452#0: *65 content phase: 10
2009/07/16 21:49:34 [debug] 16452#0: *65 content phase: 11
2009/07/16 21:49:34 [debug] 16452#0: *65 http filename: "/var/www/allyourbass.org/htdocs/index.xml"
2009/07/16 21:49:34 [debug] 16452#0: *65 http static fd: 16
2009/07/16 21:49:34 [debug] 16452#0: *65 http set discard body
2009/07/16 21:49:34 [debug] 16452#0: *65 xslt filter header
2009/07/16 21:49:34 [debug] 16452#0: *65 http output filter "/index.xml?"
2009/07/16 21:49:34 [debug] 16452#0: *65 copy filter: "/index.xml?"
2009/07/16 21:49:34 [debug] 16452#0: *65 xslt filter body
2009/07/16 21:49:34 [error] 16452#0: *65 not well formed XML document while sending response to client, client: 83.161.41.147, server: klep.name, request: "GET / HTTP/1.1", host: "klep.name"
2009/07/16 21:49:34 [debug] 16452#0: *65 http special response: 500, "/index.xml?"
2009/07/16 21:49:34 [debug] 16452#0: *65 http set discard body
2009/07/16 21:49:34 [debug] 16452#0: *65 xslt filter header
2009/07/16 21:49:34 [debug] 16452#0: *65 HTTP/1.1 500 Internal Server Error
Server: nginx/0.8.5
Date: Thu, 16 Jul 2009 19:49:34 GMT
Content-Type: text/html
Content-Length: 192
Connection: close
2009/07/16 21:49:34 [debug] 16452#0: *65 http write filter: l:0 f:0 s:161
2009/07/16 21:49:34 [debug] 16452#0: *65 http output filter "/index.xml?"
2009/07/16 21:49:34 [debug] 16452#0: *65 copy filter: "/index.xml?"
2009/07/16 21:49:34 [debug] 16452#0: *65 xslt filter body
2009/07/16 21:49:34 [debug] 16452#0: *65 http postpone filter "/index.xml?" 098EDFE0
2009/07/16 21:49:34 [debug] 16452#0: *65 http write filter: l:1 f:0 s:353
2009/07/16 21:49:34 [debug] 16452#0: *65 http write filter limit 0
2009/07/16 21:49:34 [debug] 16452#0: *65 http write filter 00000000
2009/07/16 21:49:34 [debug] 16452#0: *65 copy filter: 0 "/index.xml?"
2009/07/16 21:49:34 [debug] 16452#0: *65 copy filter: -1 "/index.xml?"
2009/07/16 21:49:34 [debug] 16452#0: *65 http finalize request: -1, "/index.xml?" 1
2009/07/16 21:49:34 [debug] 16452#0: *65 http close request
2009/07/16 21:49:34 [debug] 16452#0: *65 http log handler
2009/07/16 21:49:34 [debug] 16452#0: *65 close http connection: 15
[/code]
Some more info
[code]
$ nginx -V
nginx version: nginx/0.8.5
configure arguments: --with-http_xslt_module --with-mail --http-client-body-temp-path=/tmp/nginx/client-body-temp/ --http-proxy-temp-path=/tmp/nginx/proxy-temp/ --http-fastcgi-temp-path=/tmp/nginx/fastcgi-temp/ --with-md5-asm --with-sha1-asm --with-http_ssl_module --with-http_perl_module --with-http_sub_module --with-http_secure_link_module --prefix=/usr --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --http-log-path=/var/log/nginx/access.log --with-debug
[/code]
[code]
$ uname -a
Linux webserver 2.6.26-1-openvz-686 #1 SMP Sat Nov 8 21:19:32 UTC 2008 i686 GNU/Linux
[/code]
Does anyone have any idea what might be the issue? I've looked through the code of the module but nothing strikes me as obviously wrong.
Regards,
Robert