Roberto De Ioris | 21 Sep 08:42 2014
Picon

Important api change for plugin developers


Hi all, as promised uWSGI 2.1 will not be limited anymore to 16bit request
size.

All of the protocols (except uwsgi/suwsgi/uwsgip obviously) can now manage
64bit request size. By default the buffer size is limited to 4k as always
(yeah, i know this is annoying for someone, but unfortunately moving to 8k
would result in an automatic double in memory usage for users of async
modes, so we need to think about it a little bit more).

This means that users of mercurial (that makes an heavy use of http
headers to carry blobs) can now use it with uWSGI simply setting
http/fastcgi/scgi/... protocols.

From the plugin developers point of view there are two major changes:

uwsgi.buffer_size is 64bit, and the old pointer has been mapped to
uwsgi.__buffer_size (to retain ABI compatibility).

wsgi_req->uh->pktsize has been renamed to wsgi_req->uh->_pktsize to avoid
errors, as the new way for checking the request size is wsgi_req->len

wsgi_req->uh->_pktsize is meaningful only for plugins directly dealing
with uwsgi protocol.

Take in account that even if uwsgi requests are limited to 16bit (by
protocol specs), internally you are free to extend it to 64bit, so you are
able to add request-vars via internal routing framework. So having a
buffer-size > 64k could be useful even for plain uwsgi mode.

(Continue reading)

Matt Phipps | 19 Sep 00:06 2014
Picon

reload-on-exception and threads

Hi uWSGI,

We've got a Flask (Python) app using dogpile.cache, and are having a strange production issue where the cache doesn't seem to be refreshing. My suspicion is that a request locked a cache key, started getting a fresh value from the DB, then was terminated before it could unlock the cache key.

So here's my question: if we have reload-on-exception on and multiple threads per worker (as we do), 2 threads are handling requests at the same time, and one of them encounters an exception (e.g. IOError from SIGPIPE) that causes uWSGI to reload the worker, will uWSGI wait for the second thread to finish its response, or will it just kill the worker immediately?

Thanks,
Matt
_______________________________________________
uWSGI mailing list
uWSGI@...
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
Tamer Higazi | 18 Sep 20:20 2014

problem running uwsgi with php5 in embedded mode!

Hi people!

I followed the guide, and built the php5 version in embedded mode. Setup
on apache the proxy server and started uwsgi:

LD_LIBRARY_PATH=/usr/local/php5-emb/lib ./uwsgi --plugin plugins/php/php
--master --socket 127.0.0.1:3030 --processes 4 --php-allowed-ext .php
--php-allowed-ext .inc --php-ini /usr/local/php5-emb/lib/php.ini --chdir
/var/www/prestashop

When I open the browser, I get this error message on the shell:

--- no python application found, check your startup logs for errors ---
[pid: 24693|app: -1|req: -1/1] 85.212.100.237 () {60 vars in 1079 bytes}
[Thu Sep 18 19:46:55 2014] GET / => generated 21 bytes in 0 msecs
(HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)

Can you tell me, what I did wrong ?!

Thanks, Tamer
nitin chandra | 16 Sep 06:36 2014
Picon

jQuery with uWSGI

Hello All,

I am trying to configure jQuery with uWSGI + nginx on localhost.

But it is not working, and I wish to develop an application for my
office over intranet.

jQuery folder and jQuery-ui folder are in a home/ user directory.

I am trying to use autocomplete feature of jQuery.

OS : Debian 7.6
Webserver : Nginex
WSGI : uWSGI
Dev. Language : Python 2.7.x

Need some suggestion, how to resolve this issue.

Thanks

Nitin
Roberto De Ioris | 15 Sep 18:31 2014
Picon

[ANNOUNCE] uwsgi-docker plugin


We finally have a plugin for integration between the Emperor and docker.

My first objective was having something working, but it looks like it has
already the potential to extremely simplify docker deployments.

Please test it

https://github.com/unbit/uwsgi-docker

If you have ideas for improvements, feel free to post here (or open an
issue on github)

--

-- 
Roberto De Ioris
http://unbit.it
Roberto De Ioris | 12 Sep 06:50 2014
Picon

Merged 2.1, branched 2.0

Hi all,

The 2.1 branch has been merged into master, while the branch 2.0 (LTS) has
been created. (2.0.x maintenance cycle will continue here)

Regards

--

-- 
Roberto De Ioris
http://unbit.it
AMARASINGHAM, Chandra | 12 Sep 05:31 2014
Picon

Re: meaning of metrics

Hi Roberto,

Sorry about the late response, but these are some questions I have.  I used  rrd graph to look at the metrics.  My
command to produce the graphs is 

"rrdtool", "graph", metric + ".png", "--imgformat", "PNG", "DEF:metric=" + metric +
'.rrd:metric:AVERAGE', 'LINE1:metric#0000FF:"' + metric + '\l"'

where metric is replaced by each particular metric.

Anyway these are my questions.

delta_requests - is this time between requests?
requests - Seems to be a time measure.  Is it time for a particular request?
rss and vsz size - Always seems to be 0
avg_response_time - Is this measured in milliseconds?  units show up on rrd graph as K.

Regards,
Chandra

Chandra Amarasingham
Analyst Programmer
Specialist Diagnostic Services Pty Ltd
17 Enterprise Grove, Mt Helen, 3350
Federation University Technology Park

T: (03) 5330 1056 ext 212

This email (including any attachments) is intended only for the addressee.  It may contain confidential or
legally privileged information. Confidentiality and privilege are not waived or lost if you are not the
intended recipient of this email, nor may you use, review, disclose, disseminate or copy any information
contained in or attached to it. If you receive this email in error, please delete it and any attachments
from your system and notify us immediately. It is your responsibility to check this email and any
attachments, before opening or using them, for viruses or defects. You assume all liability arising from
opening or using this email and any attachment.

________________________________________
From: uwsgi-bounces@...
[uwsgi-bounces@...] on behalf of Roberto De Ioris [roberto@...]
Sent: Thursday, 4 September 2014 5:13 PM
To: uWSGI developers and users list
Subject: Re: [uWSGI] meaning of metrics

> Hi All,
>
>
>
> from the rrd data generated by the rrdtool plugin, I managed to generate
> some graphs using a command like the following
>
>
>
> ls | xargs -I{} rrdtool graph {}.png --imgformat PNG
> DEF:metric={}:metric:AVERAGE LINE1:metric#0000FF:"{}\l"
>
>
>
> However I am a little puzzled by what some of the graphs mean along with
> the units used to measure.  Is there a good source which explains what the
> individual metrics mean?
>
>

Hi,

the core metrics should be quite self-explanatory, but an official list is
obviously needed.

Is there some specific metric for which you need explanation ?

--
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
uWSGI@...
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
Roberto De Ioris | 5 Sep 11:46 2014
Picon

[ANNOUNCE] uWSGI 2.0.7


Hi, uWSGI 2.0.7 (LTS) has been released.

This is mainly a bugfix release, with only a couple of minor new features.

http://uwsgi-docs.readthedocs.org/en/latest/Changelog-2.0.7.html

--

-- 
Roberto De Ioris
http://unbit.it
Tim Tisdall | 4 Sep 21:16 2014
Picon

turning on warning messages

Is there some way to turn on Python warning messages?

I've read you can use PYTHONWARNINGS environment variable or -Wd as a command line argument, but I can't seem to figure out how to get my server to start logging warning messages.
_______________________________________________
uWSGI mailing list
uWSGI@...
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
AMARASINGHAM, Chandra | 3 Sep 10:51 2014
Picon

meaning of metrics

Hi All,

 

from the rrd data generated by the rrdtool plugin, I managed to generate some graphs using a command like the following

 

ls | xargs -I{} rrdtool graph {}.png --imgformat PNG DEF:metric={}:metric:AVERAGE LINE1:metric#0000FF:"{}\l"

 

However I am a little puzzled by what some of the graphs mean along with the units used to measure.  Is there a good source which explains what the individual metrics mean?

 

Regards,

Chandra

Chandra Amarasingham
Analyst Programmer
Specialist Diagnostic Services Pty Ltd
17 Enterprise Grove, Mt Helen, 3350
Federation University Technology Park
 
T: (03) 5330 1056 ext 212
 
This email (including any attachments) is intended only for the addressee.  It may contain confidential or legally privileged information. Confidentiality and privilege are not waived or lost if you are not the intended recipient of this email, nor may you use, review, disclose, disseminate or copy any information contained in or attached to it. If you receive this email in error, please delete it and any attachments from your system and notify us immediately. It is your responsibility to check this email and any attachments, before opening or using them, for viruses or defects. You assume all liability arising from opening or using this email and any attachment.
_______________________________________________
uWSGI mailing list
uWSGI@...
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
David Montgomery | 2 Sep 15:51 2014
Picon

flask and the gevent loop - do i have to yield?



from gevent import monkey; monkey.patch_all()
from flask import render_template
from flask import Response
from app import app
import urllib2

def fetch_url(url):
   response = urllib2.urlopen('http://python.org/'
   html = response.read()

<at> app.route("/test")
def test():
    jt=gevent.spawn(fetch_url)
    jt.join()
    return "Hello World"


Or do I have to


<at> app.route("/test")
def test():
    jt=gevent.spawn(fetch_url)
    jt.join()
        def generate():                     
              yield "hello world"
        return Response(generate())


I would like the call to the urllib2 to by async





_______________________________________________
uWSGI mailing list
uWSGI@...
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Gmane