Несколько возможно важных моментов<br>1) По кэшу видно, что ответ от бэкенда приходит правильный<br>2) Переключил php и nginx на юникс-сокеты, проблема пропала<br><br><div class="gmail_quote">5 июня 2009 г. 12:58 пользователь Noon es Shadow <span dir="ltr">&lt;<a href="mailto:noonesshadow@gmail.com">noonesshadow@gmail.com</a>&gt;</span> написал:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Схема:<br>Клиент посылает запрос, если это динамика то Нгинк пересылает запрос на бэкенд php по fastcgi, тип ответа text/xml, и выполняет трансформацию по заданному шаблону XSL<br>
Изредка, примерно раз из 100, случается следующее:<br>
Клиенту выдается ошибка 500 (internal server error), в лог пишется<br>not well formed XML document while sending to client<br>При повторном обновлении страницы все срабатывает как надо.<br><br>Система: Linux 2.6.25-14.fc9.i686, epoll,<br>

<br>configure arguments: --with-http_xslt_module --without-http_rewrite_module --without-http_memcached_module --without-http_upstream_ip_hash_module --with-debug --with-pcre=./pcre-7.9<br>(аналогично происходит и при configure arguments: --with-http_xslt_module --with-pcre=./pcre-7.9)<br>

<br><b>--with-debug:</b><br>2009/06/05 12:30:46 [debug] 17496#0: *5 http upstream request: &quot;/info/s32.html?&quot;<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http upstream dummy handler<br>2009/06/05 12:30:46 [debug] 17496#0: timer delta: 1<br>

2009/06/05 12:30:46 [debug] 17496#0: posted events 00000000<br>2009/06/05 12:30:46 [debug] 17496#0: worker cycle<br>2009/06/05 12:30:46 [debug] 17496#0: epoll timer: 52840<br>2009/06/05 12:30:46 [debug] 17496#0: epoll: fd:18 ev:0005 d:09A082C1<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 http upstream request: &quot;/info/s32.html?&quot;<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http upstream process upstream<br>2009/06/05 12:30:46 [debug] 17496#0: *5 pipe read upstream: 1<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 readv: 5:4096<br>2009/06/05 12:30:46 [debug] 17496#0: *5 pipe recv chain: 0<br>2009/06/05 12:30:46 [debug] 17496#0: *5 pipe buf free s:0 t:1 f:0 09A39F78, pos 09A39F78, size: 1616 file: 0, size: 0<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 pipe buf free s:0 t:1 f:0 09A3CF90, pos 09A3CF90, size: 0 file: 0, size: 0<br>2009/06/05 12:30:46 [debug] 17496#0: *5 pipe buf free s:0 t:1 f:0 09A3AF80, pos 09A3AF80, size: 0 file: 0, size: 0<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 pipe buf free s:0 t:1 f:0 09A37F68, pos 09A37F68, size: 0 file: 0, size: 0<br>2009/06/05 12:30:46 [debug] 17496#0: *5 pipe buf free s:0 t:1 f:0 09A38F70, pos 09A38F70, size: 0 file: 0, size: 0<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 input buf #5 09A39F78<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record byte: 01<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record byte: 06<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record byte: 00<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record byte: 01<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record byte: 00<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record byte: 01<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record byte: 07<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record byte: 00<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record length: 1<br>2009/06/05 12:30:46 [debug] 17496#0: *5 input buf #5 09A3A5B0<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record byte: 01<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record byte: 03<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record byte: 00<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record byte: 01<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record byte: 00<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record byte: 08<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record byte: 00<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record byte: 00<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi record length: 8<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 http fastcgi sent end request<br>2009/06/05 12:30:46 [debug] 17496#0: *5 input buf 09A3A5B0 1<br>2009/06/05 12:30:46 [debug] 17496#0: *5 free: 09A3CF90<br>2009/06/05 12:30:46 [debug] 17496#0: *5 free: 09A3AF80<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 free: 09A37F68<br>2009/06/05 12:30:46 [debug] 17496#0: *5 free: 09A38F70<br>2009/06/05 12:30:46 [debug] 17496#0: *5 pipe write downstream: 1<br>2009/06/05 12:30:46 [debug] 17496#0: *5 pipe write downstream flush in<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 http output filter &quot;/info/s32.html?&quot;<br>2009/06/05 12:30:46 [debug] 17496#0: *5 copy filter: &quot;/info/s32.html?&quot;<br>2009/06/05 12:30:46 [debug] 17496#0: *5 xslt filter body<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 copy filter: 0 &quot;/info/s32.html?&quot;<br>2009/06/05 12:30:46 [debug] 17496#0: *5 pipe write downstream done<br>2009/06/05 12:30:46 [debug] 17496#0: *5 event timer: 18, old: 2948757598, new: 2948757635<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 http upstream exit: 00000000<br>2009/06/05 12:30:46 [debug] 17496#0: *5 finalize http upstream request: 0<br>2009/06/05 12:30:46 [debug] 17496#0: *5 finalize http fastcgi request<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 free rr peer 1 0<br>2009/06/05 12:30:46 [debug] 17496#0: *5 close http upstream connection: 18<br>2009/06/05 12:30:46 [debug] 17496#0: *5 event timer del: 18: 2948757598<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http upstream temp fd: -1<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 http output filter &quot;/info/s32.html?&quot;<br>2009/06/05 12:30:46 [debug] 17496#0: *5 copy filter: &quot;/info/s32.html?&quot;<br>2009/06/05 12:30:46 [debug] 17496#0: *5 xslt filter body<br>

2009/06/05 12:30:46 [error] 17496#0: *5 not well formed XML document while sending to client, client: ***.***.***.***, server: ***.***.***.***, request: &quot;GET /info/s32.html HTTP/1.1&quot;, upstream: &quot;fastcgi://<a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a>&quot;, host: &quot;***.***.***.***&quot;<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 http special response: 500, &quot;/info/s32.html?&quot;<br>2009/06/05 12:30:46 [debug] 17496#0: *5 http set discard body<br>2009/06/05 12:30:46 [debug] 17496#0: *5 xslt filter header<br>

2009/06/05 12:30:46 [debug] 17496#0: *5 HTTP/1.1 500 Internal Server Error<br><br>
</blockquote></div><br>