Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Соединение было сб рошено [aio] [FreeBSD]
On Fri, Sep 11, 2009 at 03:56:53AM +0400, Alexey Ivanov wrote:
> Увеличил уровень логирования, вот какая ошибка попадает в лог
>
> 2009/09/10 23:45:35 [info] 68677#0: *4866 client timed out (60: Operation
> timed out) while sending to client, client: 10.0.0.1, server: www.ph34r.ru,
> request: "GET
> /forum/admin/admin_forums.php?sid=9b075396b30be28e5a5b05b949947290 HTTP/1.1",
> upstream: "fastcgi://unix:/tmp/php.sock:", host: "www.ph34r.ru", referrer:
> "http://www.ph34r.ru/forum/admin/index.php?pane=left&sid=9b075396b30be28e5a5b05b949947290"
>
> полный debug log этого запроса в аттаче
Дополнительный прилагаемый патч должен исправить эту ошибку.
--
Игорь Сысоев
http://sysoev.ru
Index: src/http/ngx_http_copy_filter_module.c
===================================================================
--- src/http/ngx_http_copy_filter_module.c (revision 2437)
+++ src/http/ngx_http_copy_filter_module.c (working copy)
@@ -87,10 +87,6 @@
c = r->connection;
- if (r->aio) {
- return NGX_AGAIN;
- }
-
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
"http copy filter: \"%V?%V\"", &r->uri, &r->args);
@@ -123,7 +119,7 @@
#if (NGX_HAVE_FILE_AIO)
if (clcf->aio) {
- ctx->aio = ngx_http_copy_aio_handler;
+ ctx->aio_handler = ngx_http_copy_aio_handler;
#if (NGX_HAVE_AIO_SENDFILE)
c->aio_sendfile = (clcf->aio == NGX_HTTP_AIO_SENDFILE);
#endif
@@ -133,6 +129,10 @@
r->request_output = 1;
}
+#if (NGX_HAVE_FILE_AIO)
+ ctx->aio = r->aio;
+#endif
+
for ( ;; ) {
rc = ngx_output_chain(ctx, in);
Index: src/core/ngx_output_chain.c
===================================================================
--- src/core/ngx_output_chain.c (revision 2437)
+++ src/core/ngx_output_chain.c (working copy)
@@ -74,6 +74,12 @@
}
}
+#if (NGX_HAVE_FILE_AIO)
+ if (ctx->aio) {
+ return NGX_AGAIN;
+ }
+#endif
+
out = NULL;
last_out = &out;
last = NGX_NONE;
@@ -519,11 +525,11 @@
#if (NGX_HAVE_FILE_AIO)
- if (ctx->aio) {
+ if (ctx->aio_handler) {
n = ngx_file_aio_read(src->file, dst->pos, (size_t) size,
src->file_pos, ctx->pool);
if (n == NGX_AGAIN) {
- ctx->aio(ctx, src->file);
+ ctx->aio_handler(ctx, src->file);
return NGX_AGAIN;
}
Index: src/core/ngx_buf.h
===================================================================
--- src/core/ngx_buf.h (revision 2437)
+++ src/core/ngx_buf.h (working copy)
@@ -89,7 +89,12 @@
#endif
unsigned need_in_memory:1;
unsigned need_in_temp:1;
+#if (NGX_HAVE_FILE_AIO)
+ unsigned aio:1;
+ ngx_output_chain_aio_pt aio_handler;
+#endif
+
off_t alignment;
ngx_pool_t *pool;
@@ -99,10 +104,6 @@
ngx_output_chain_filter_pt output_filter;
void *filter_ctx;
-
-#if (NGX_HAVE_FILE_AIO)
- ngx_output_chain_aio_pt aio;
-#endif
};
|