Re: 答复: problems when use fastcgi_pass to deliver request to backend
Sergey Brester
serg.brester at sebres.de
Fri May 29 08:40:05 UTC 2015
Hi,
It's called fastcgi multiplexing and nginx currently does not implement
that (and I don't know .
There were already several discussions about that, so read here, please.
[22]
Short, very fast fastcgi processing may be implemented without
multiplexing (should be event-driven also).
Regards,
sebres.
Am 29.05.2015 09:58, schrieb 林谡:
> _/* we support the single request per connection */_
>
> 2573 [2]
>
> 2574 [3]
>
> CASE ngx_http_fastcgi_st_request_id_hi:
>
> 2575 [4]
>
> IF (ch != 0) {
>
> 2576 [5]
>
> ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
>
> 2577 [6]
>
> "upstream sent unexpected FastCGI "
>
> 2578 [7]
>
> "request id high byte: %d", ch);
>
> 2579 [8]
>
> RETURN NGX_ERROR;
>
> 2580 [9]
>
> }
>
> 2581 [10]
>
> state = ngx_http_fastcgi_st_request_id_lo;
>
> 2582 [11]
>
> BREAK;
>
> 2583 [12]
>
> 2584 [13]
>
> CASE ngx_http_fastcgi_st_request_id_lo:
>
> 2585 [14]
>
> IF (ch != 1) {
>
> 2586 [15]
>
> ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
>
> 2587 [16]
>
> "upstream sent unexpected FastCGI "
>
> 2588 [17]
>
> "request id low byte: %d", ch);
>
> 2589 [18]
>
> RETURN NGX_ERROR;
>
> 2590 [19]
>
> }
>
> 2591 [20]
>
> state = ngx_http_fastcgi_st_content_length_hi;
>
> 2592 [21]
>
> BREAK;
>
> By reading source code, I saw the reason , so can nginx support multi request per connection in future?
>
> 发件人: 林谡
> 发送时间: 2015年5月29日 11:37
> 收件人: 'nginx-devel at nginx.org'
> 主题: problems when use fastcgi_pass to deliver request to backend
>
> Hi,
>
> I write a fastcgi server and use nginx to pass request to my server. It works till now.
>
> But I find a problem. Nginx always set requestId = 1 when sending fastcgi record.
>
> I was a little upset for this, cause according to fastcgi protocol, web server can send fastcgi records belonging to different request simultaneously, and requestIds are different and keep unique. I really need this feature, because requests can be handled simultaneously just over one connetion.
>
> Can I find a way out?
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel [1]
Links:
------
[1] http://mailman.nginx.org/mailman/listinfo/nginx-devel
[2]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2573
[3]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2574
[4]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2575
[5]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2576
[6]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2577
[7]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2578
[8]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2579
[9]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2580
[10]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2581
[11]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2582
[12]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2583
[13]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2584
[14]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2585
[15]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2586
[16]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2587
[17]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2588
[18]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2589
[19]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2590
[20]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2591
[21]
http://trac.nginx.org/nginx/browser/nginx/src/http/modules/ngx_http_fastcgi_module.c#L2592
[22] http://forum.nginx.org/read.php?2,237158
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20150529/03782692/attachment-0001.html>
More information about the nginx-devel
mailing list