Hi,

uwsgi 2.0.10, devops team just built 2.0.11 for me to try.

I could reproduce problem with synchronous psgi app. Started uwsgi with one
process, requested url that sleeps for 20 seconds, after that got request
in sync app to url /test.html,%20/errors/502.html.

sync app config:

[uwsgi]
buffer-size = 16384
http-socket = 0.0.0.0:9000
chdir = /home/sports/Site/
psgi = /home/sports/Site/bin/server.psgi
processes = 1
master = true
uid = sports
gid = sports
plugin = http, logfile, psgi
env = PERL5LIB=/srv/sports/site-perl/deps/lib/perl5:/usr/lib/perl5/lib/perl5
env = SPORTS_CONFIG_TYPE=dev
env = HOME=/home/sports
env = DEBUG=0
env = LOG_LEVEL=DEBUG
# Harakiri timeout in seconds.
harakiri = 3
harakiri-verbose = true
# set the maximum time (in seconds) we wait for workers and other processes
to die during reload/shutdown
reload-mercy = 4
# reload workers after the specified amount of managed requests
max-requests = 1000
req-logger = file:/var/log/uwsgi/app/site-perl.access.log

post-buffering = 1

async app config:

[uwsgi]
buffer-size = 16384
log-master-bufsize = 32768
http-socket = 0.0.0.0:5002
psgi = /usr/lib/perl5/bin/sprt-combiner.psgi
processes = 2
master = true
uid = sports
gid = sports
plugin = http, async, coroae, logfile
env = SPRT_COMBINER_CONFIG=/home/sports/combiner-routes/combiner.config.json
env =
PERL5LIB=/usr/lib/perl5/lib/perl5/x86_64-linux-gnu-thread-multi:/usr/lib/perl5/lib/perl5
env = SPRT_LOCALE_PATH=/home/sports/po_files
coroae = 128
harakiri = 10
harakiri-verbose = true
reload-mercy = 4
max-requests = 1000
req-logger = file:/var/log/uwsgi/app/combiner.access.log

Going to try 2.0.11 and report back

On Wed, Sep 16, 2015 at 2:16 PM, Roberto De Ioris <[email protected]> wrote:

>
> > 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.
> >
>
> Hi, report your uWSGI version (this was a bug on pre 2.0 uWSGI versions)
> and full configuration
>
>
> --
> Roberto De Ioris
> http://unbit.com
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>



-- 
Руслан Закиров
Руководитель отдела разработки веб-сервисов
+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