Hi,

Short summary:

My async psgi application from time to time gets request environment with
two set of headers from different HTTP requests combined into one.

Longer version:

nginx in front proxy passing requests to uwsgi back-end running app with
psgi and coroae plugins. I can not reproduce this problem in isolated
environment, so I only have set of logs from fronts and backs.

Two requests on one front-end:

[15/Sep/2015:14:41:15 +0300] "GET /tennis/fedcup/ HTTP/1.1" 200 70202 "-"
"Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
"157.55.39.48" MISS [0.406, 1.254] 1.669 {192.168.1.42:5002,
192.168.1.43:5002} 282
[15/Sep/2015:14:41:15 +0300] "GET / HTTP/1.1" 404 16404 "-" "Mozilla/5.0
(Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/600.7.12 (KHTML, like Gecko)
Version/6.2.7 Safari/537.85.16" "86.203.194.13" HIT [0.010] 0.011 {
192.168.1.42:5002} 1758

Both hit .42 backend, first request got some error response and bounced to
another backend for retry.

On the backend in uwsgi access log I see only one request:

[pid: 10585|app: 0|req: 100077/199815] 192.168.1.11 () {72 vars in 2526
bytes} [Tue Sep 15 14:41:15 2015] GET /desktop/ => generated 9 bytes in 8
msecs (HTTP/1.0 404) 1 headers in 67 bytes (1 switches on core 127)

In app's log I see the following:

request for /desktop/tennis/fedcup/, /desktop/ on www.sports.ru,
www.sports.ru
App logs $env->{REQUEST_URI} and $env->{HTTP_HOST} at the beginning.

>From psgi's plugin source code I see that if a header repeated multiple
times in the request then into perl world it gets as comma separated record
in the environment hash. This is why I made conclusion that these are two
requests combined into one.

Any ideas on why this is happening? On how to debug this? reproduce?

PS: It may be related to harikiri. We don't have harakiri log entries in
these logs, but they show up on a console and we feel that they are related
to this problem.

-- 
Руслан Закиров
Руководитель отдела разработки веб-сервисов
+7(916) 597-92-69, ruz @  <http://www.sports.ru/>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to