Re: [uWSGI] listen queue overflow in a coroae app (not restart)

2018-04-27 Thread INADA Naoki
7}, > {"Not found", 9}], 2) = 76 <0.34> > 08:54:44.971252 close(15) = 0 <0.29> > 08:54:44.971328 writev(8, [{"[pid: 26800|app: 0|req: 113095/1"..., 208}], > 1) = 208 <0.26> > > > Usage of cores is very low: > &g

Re: [uWSGI] listen queue overflow in a coroae app (not restart)

2018-04-27 Thread INADA Naoki
On Fri, Apr 27, 2018 at 8:42 PM Руслан Закиров wrote: > On Fri, Apr 27, 2018 at 10:36 AM, INADA Naoki wrote: >> https://uwsgi-docs.readthedocs.io/en/latest/Options.html#listen https://serverfault.com/questions/271380/how-can-i-increase-the-value-of-somaxconn > Guys, > I kno

Re: [uWSGI] listen queue overflow in a coroae app (not restart)

2018-04-28 Thread INADA Naoki
> > > > However, I agree that 100 is less than 200 and queue will be overflown if > > ab > > generates requests faster than the app processes them. Sure ab fires > > things > > quite fast. > > > > I oversimplified my production case. In the presented case it's 1.5ms > > between accept() > > calls.

Re: [uWSGI] (no subject)

2013-11-26 Thread INADA Naoki
a way to imporve the performance when uwsgi is behind nginx? > Thank you. > all my confs and codes are here: > https://gist.github.com/maliubiao/7653464 > ___ > uWSGI mailing list > uWSGI@lists.unbit.it > http://lists.unbit.it/cgi-bin/ma

Re: [uWSGI] Problems managing uwsgi with supervisor

2014-03-17 Thread INADA Naoki
t; [supervisorctl] > serverurl=unix:///var/run/supervisor.sock > [include] > files = /var/www/test/supervisor*.ini > EOF > > cat << EOF > /var/www/test/supervisor_app.ini > [program:test] > command=/usr/local/bin/uwsgi --ini /var/www/test/uwsgi_test.ini > us

Re: [uWSGI] Problems managing uwsgi with supervisor

2014-03-19 Thread INADA Naoki
, >> can someone please help? >> _______ >> uWSGI mailing list >> uWSGI@lists.unbit.it >> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >> > > You should post uWSGI logs, they will report why the instance is not > stopped. > > By the way if you are using supervisord only for uWSGI consider the > Emperor instead as it is way easier > > -- > Roberto De Ioris > http://unbit.it > ___ > uWSGI mailing list > uWSGI@lists.unbit.it > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > > > ___ > uWSGI mailing list > uWSGI@lists.unbit.it > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > -- INADA Naoki ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Re: [uWSGI] Possible setup race condition between uwsgi-plugin-python and python-flask

2014-04-08 Thread INADA Naoki
;> >> >> I see nothing strange in it, but once you get 404 you continue to get it >> or it get fixed after a bunch of requests ? > > > the 404 happens right after the respawning, happens 1-2 times and goes away > again (prob

Re: [uWSGI] Possible setup race condition between uwsgi-plugin-python and python-flask

2014-06-15 Thread INADA Naoki
;> > ...The work of process 22494 is done. Seeya! >>> > ...The work of process 22495 is done. Seeya! >>> > worker 2 killed successfully (pid: 22494) >>> > Respawned uWSGI worker 2 (new pid: 22685) >>> > worker 1 killed successfully (pid: 22495) >>

Re: [uWSGI] uWSGI listen queue of socket

2014-06-24 Thread INADA Naoki
I also tried to change the default value from uwsgi.listen_queue = 100; > <https://github.com/unbit/uwsgi/blob/930c19210af71511b0288cb61a8901606038f077/core/init.c#L109>, > recompiled the uwsgi but still the same result. I'm not sure what I'm doing > wrong. >

[uWSGI] [ANN] mysqlclient-python 1.3.2 is released

2014-07-03 Thread INADA Naoki
nt.py Uwsgi provides async mode and API for waiting it. I have not tested yet, but it may work. http://uwsgi-docs.readthedocs.org/en/latest/PythonModule.html#uwsgi.wait_fd_read -- INADA Naoki ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unb

Re: [uWSGI] [ANN] mysqlclient-python 1.3.2 is released

2014-07-03 Thread INADA Naoki
iter_gevent.py >> >> I guess this will work with uwsgi's support for gevent, but how would >> you plug it in SQLAlchemy? >> >> >> >> -- >> damjan >> ___ >> uWSGI mailing list >> uWSGI@lists.unbit.it

Re: [uWSGI] [ANN] mysqlclient-python 1.3.2 is released

2014-07-04 Thread INADA Naoki
ples/waiter_gevent.py > > I guess this will work with uwsgi's support for gevent, but how would > you plug it in SQLAlchemy? > > > > -- > damjan > ___ > uWSGI mailing list > uWSGI@lists.unbit.it > http://lists.unbi

Re: [uWSGI] When the backlog is full, is uwsgi supposed to accept connections?

2014-08-19 Thread INADA Naoki
1... >> > Connected to localhost. >> > Escape character is '^]'. >> > GET /test HTTP/1.1 >> > >> > Connection closed by foreign host. >> > >> > real1m17.867s >> > user0m0.000s >> > sys 0m0.008s >> > >> > and worked another time: >> > >> > $ time telnet localhost 9090 >> > Trying 127.0.0.1... >> > Connected to localhost. >> > Escape character is '^]'. >> > GET /test HTTP/1.1 >> > >> > HTTP/1.1 200 OK >> > Content-Type: text/html >> > >> > Hello WorldConnection closed by foreign host. >> > >> > real1m59.701s >> > user0m0.000s >> > sys 0m0.004s >> > >> > >> > So either way, uwsgi still accepts the connection. >> > >> > >> >> I fear you are testing in the wrong way. What you describe is basically >> impossible, event with defer-accept the amount of manageable connections >> is always limited (by the kernel memory). >> >> With defer-accept you tell the kernel to pass the request to the socket >> until a packet arrives, without defer-accept the connection (if there are >> slots in the listen queue) the request is passed to the socket and first >> free worker accept() it. >> >> Best way, would be attaching a strace to the worker before running the >> test (in uWSGI only workers accept() requests, there is no arbitrer or >> similar, unless you add a proxy) >> >> You should: >> >> spawn a single worker with --http-socket and listen queue of 2 and strace >> it, open at least 10 curl requests (the listen queue size is not precise >> for various reasons, there are generally a couple more slots allocated) to >> the app (the should generate a loop). Open a telnet session, without >> defer-accept the connection should timeout or close (based on kernel >> settings) >> >> -- >> Roberto De Ioris >> http://unbit.it >> ___ >> uWSGI mailing list >> uWSGI@lists.unbit.it >> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > > > > > -- > Francois > > ___ > uWSGI mailing list > uWSGI@lists.unbit.it > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > -- INADA Naoki ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Re: [uWSGI] Important api change for plugin developers

2014-09-21 Thread INADA Naoki
> but: > > - nginx sending a huge 80k request (that will overflow) > - albeit the buffer is 100k the uwsgi protocol can carry only 64k, so the > request will be detected as broken and the connection closed. > Does "request" mean "request header"? ___ uWS

Re: [uWSGI] Problem with mysql + uwsgi

2015-06-01 Thread INADA Naoki
How do you use MySQL? MySQL's default transaction isolation level is "repeatable read". If you didn't close transaction properly for each requests, you'll see data for time you start transaction. On Tue, Jun 2, 2015 at 2:40 PM Manivel Rajendran wrote: > Hi, > > I am using MySQL as my backend fo

Re: [uWSGI] Problem with mysql + uwsgi

2015-06-02 Thread INADA Naoki
TTED" > > On Tue, Jun 2, 2015 at 11:38 AM, INADA Naoki > wrote: > >> How do you use MySQL? >> >> MySQL's default transaction isolation level is "repeatable read". >> If you didn't close transaction properly for each requests, you'll

[uWSGI] Can I run GC right after sending response?

2015-06-02 Thread INADA Naoki
end of each request. gc.collect() # Run full GC before accepting request. ​But in this pattern, each GC happen before sending response. I want to run GC after sending response and before accepting next request. Does uWSGI API support this? ​ -- INADA Naoki

Re: [uWSGI] Can I run GC right after sending response?

2015-06-03 Thread INADA Naoki
request. > > > > ​But in this pattern, each GC happen before sending response. > > I want to run GC after sending response and before accepting next > request. > > Does uWSGI API support this? > > ​ > > -- > > INADA Naoki > > > uwsgi.after_req_hoo

Re: [uWSGI] ELB claims socket closed too soon.

2015-07-07 Thread INADA Naoki
r we're here >> subscribe-to = 127.0.0.1:8001:%c.mysite.com >> >> post-buffering = 1 >> # Prevent memory exhaustion >> reload-on-rss = 400 >> >> memory-report = true >> stats-server = %dlogs/stats.sock >> >> >> >> -- >> Curtis >> ___ >> uWSGI mailing list >> uWSGI@lists.unbit.it >> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >> > ___ > uWSGI mailing list > uWSGI@lists.unbit.it > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > -- INADA Naoki ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Re: [uWSGI] How to keep database connection in app whole lifetime

2015-07-08 Thread INADA Naoki
to? > > Thanks~ > > -- > Rejoice,I Desire! > ___ > uWSGI mailing list > uWSGI@lists.unbit.it > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > -- INADA Naoki ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Re: [uWSGI] Problem compiling Python as plugin

2015-07-29 Thread INADA Naoki
plugins/python *** > [gcc -pthread] python34_plugin.so > build time: 3 seconds > *** python34 plugin built and available in python34_plugin.so *** > ​ > ​Do you have any idea why I get this error? Am I missing some > configuration parameter before the Python compilation?​ >

Re: [uWSGI] nginx connection reset when reloading uwsgi

2015-11-19 Thread INADA Naoki
n a tiny wsgi application like a single function as in >> http://wsgi.tutorial.codepoint.net/environment-dictionary >> >> Have you tried removing lazy-apps? >> >> >> -- >> Riccardo Magliocchetti >> @rmistaken >> >> http://menodizero.it >>

Re: [uWSGI] nginx connection reset when reloading uwsgi

2015-11-19 Thread INADA Naoki
ng a full framework :), a tiny app would have >>> been a tiny wsgi application like a single function as in >>> http://wsgi.tutorial.codepoint.net/environment-dictionary >>> >>> Have you tried removing lazy-apps? >>> >>> >>> -- >>&

[uWSGI] Can I use SIGPROF based sampling profiler with uWSGI?

2015-12-30 Thread INADA Naoki
Hi. I read this article and I want to do similar profiling in uWSGI. https://nylas.com/blog/performance But I'm not detailed with uWSGI's signal handling. Can I use SIGPROF in Python on uWSGI? What happen when receiving SIGPROF outside of Python? -- I

Re: [uWSGI] Can I use SIGPROF based sampling profiler with uWSGI?

2015-12-30 Thread INADA Naoki
ork > option. So yes, you can use it > > -- > Roberto De Ioris > http://unbit.com > ___ > uWSGI mailing list > uWSGI@lists.unbit.it > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > -- INADA Naoki ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Re: [uWSGI] invalid uwsgi request (current strsize: 55272). skip

2016-08-09 Thread INADA Naoki
> > > > ___ > uWSGI mailing list > uWSGI@lists.unbit.it > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > -- INADA Naoki ___ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi