Igor Katson | 31 Oct 02:11 2014
Picon

emperor on-demand is slow at starting to listen, when there's a lot of projects

Hi, I have a pretty large emperor on-demand uwsgi setup, with 700 projects on one machine.

When restarting the emperor, it takes somewhat long time for all the sockets to start listening.
I'd say it takes around 0.5 seconds for every line like this to appear in the logs, so the least lucky project has to wait several minutes to be able to get requests.

[uwsgi-emperor] ....ini -> "on demand" instance detected, waiting for connections on socket "...socket" ...

Is there a way to speed this up somehow?

Thanks!
_______________________________________________
uWSGI mailing list
uWSGI@...
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
Roberto De Ioris | 26 Oct 06:00 2014
Picon

[ANNOUNCE] uWSGI 2.0.8

Hi all, a new release for the 2.0 branch is available:

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

This is the first version with SSL3 disabled by default, and it is the
minimal required version for the upcoming uwsgi-realtime plugin.

You can download it from:

http://projects.unbit.it/downloads/uwsgi-2.0.8.tar.gz

Regards

--

-- 
Roberto De Ioris
http://unbit.it
Matt Phipps | 24 Oct 21:40 2014
Picon

pthread_mutex_lock

Hi uWSGI,

This strange error killed one of our workers:

[pid: 20851|app: 0|req: 48986/51858] 172.16.1.69 () {40 vars in 1650 bytes} [Tue Oct 21 07:07:03 2014] GET /tracking/load-details?guid=cceca015-af92-4047-96f9-08ac70945a82&id=20170025 => generated 383 bytes in 9 msecs (HTTP/1.1 302) 4 headers in 570 bytes (1 switches on core 1)
[pid: 20851|app: 0|req: 48986/51859] 172.16.1.69 () {50 vars in 1663 bytes} [Tue Oct 21 07:06:53 2014] POST /tracking/tracking-priority-board-data => generated 35314 bytes in 11098 msecs (HTTP/1.1 200) 3 headers in 436 bytes (1 switches on core 0)
[pid: 20851|app: 0|req: 48987/51860] 172.16.1.69 () {50 vars in 1701 bytes} [Tue Oct 21 07:07:11 2014] POST /tracking/tracking-priority-board-data => generated 233237 bytes in 1071 msecs (HTTP/1.1 200) 3 headers in 435 bytes (1 switches on core 1)
[pid: 20851|app: 0|req: 48988/51861] 172.16.1.69 () {50 vars in 1761 bytes} [Tue Oct 21 07:07:22 2014] POST /tracking/tracking-priority-board-data => generated 34070 bytes in 733 msecs (HTTP/1.1 200) 3 headers in 461 bytes (1 switches on core 0)
[pid: 20851|app: 0|req: 48989/51862] 172.16.1.69 () {50 vars in 1830 bytes} [Tue Oct 21 07:07:43 2014] POST /tracking/tracking-priority-board-data => generated 38109 bytes in 735 msecs (HTTP/1.1 200) 3 headers in 461 bytes (1 switches on core 1)
[pid: 20851|app: 0|req: 48990/51863] 172.16.1.69 () {42 vars in 1596 bytes} [Tue Oct 21 07:07:51 2014] GET /tracking/update-status/8c5cd457-8678-4757-956b-51a80a0ef071?_=1413893126339 => generated 7946 bytes in 6664 msecs (HTTP/1.1 200) 3 headers in 460 bytes (1 switches on core 0)
uwsgi: pthread_mutex_lock.c:62: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.
DAMN ! worker 4 (pid: 20851) died, killed by signal 6 :( trying respawn ...
Respawned uWSGI worker 4 (new pid: 38722)
[pid: 20848|app: 0|req: 2710/51864] 172.16.1.69 () {50 vars in 1701 bytes} [Tue Oct 21 07:08:13 2014] POST /tracking/tracking-priority-board-data => generated 233237 bytes in 1271 msecs (HTTP/1.1 200) 3 headers in 435 bytes (1 switches on core 0)
[pid: 38722|app: 0|req: 48993/51865] 172.16.1.69 () {50 vars in 1772 bytes} [Tue Oct 21 07:08:24 2014] POST /tracking/tracking-priority-board-data => generated 34070 bytes in 2844 msecs (HTTP/1.1 200) 3 headers in 461 bytes (1 switches on core 0)

What happened?

Some background: For most people a worker going down isn't the end of the world, but our app uses threads which acquire locks through Memcached (we use a load balancer and multiple app servers), so if a request gets killed before it can release the lock, that lock stays held forever; e.g. our (albeit experimental) app has been out of commission since Tuesday. Incidentally, I'm all ears if you have suggestions on handling that more resiliently :)

We're using uWSGI 2.0.1 and Ubuntu 12.04.3, both of which are a little out of date, so maybe that's the first thing we should do. In Ubuntu I think glibc is called libc6, and that version is 2.15-0ubuntu10.5.

Here's uname -a: Linux bridge-dev-web01 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 16:19:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Thanks,
Matt Phipps
_______________________________________________
uWSGI mailing list
uWSGI@...
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
Mikko Ohtamaa | 24 Oct 08:54 2014

Chrome + raw uWSGI HTTPS issues

Hi,

I was running uWSGI directly on the internet facing website in HTTP+HTTPS mode. Recently the following errors started to pop up - according to the logs the server sent the page, but Chrome reported network failure. This is probably not Chrome related, but in Chrome the problem was most repeatable: some pages did not open every time.

I inspected the problem with wget and looks like it is some sort of TLS issue. You can find the diagnostics output below.

I decided not to investigate further, but simply added Nginx at the front to handle HTTP/HTTPS and use WSGI to talk to uWSGI, as recommended on this mailing list earlier. Problem solved.

Just to let you know if somebody else uses uWSGI for raw HTTPS traffic.

--
Mikko Ohtamaa
http://opensourcehacker.com
http://twitter.com/moo9000


[/tmp]% wget -S --no-check-certificate "https://libertymusicstore.net/store/sol-music/embed/"
--2014-10-24 09:21:38--  https://libertymusicstore.net/store/sol-music/embed/
Resolving libertymusicstore.net (libertymusicstore.net)... 78.47.124.242
Connecting to libertymusicstore.net (libertymusicstore.net)|78.47.124.242|:443... connected.
WARNING: The certificate of ‘libertymusicstore.net’ is not trusted.
WARNING: The certificate of ‘libertymusicstore.net’ hasn't got a known issuer.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Content-Type: text/javascript
Length: unspecified [text/javascript]
Saving to: ‘index.html’

    [ <=>                                                                                      ] 1,213       --.-K/s   in 0s

2014-10-24 09:21:39 (23.6 MB/s) - Read error at byte 1213 (The TLS connection was non-properly terminated.).Retrying.

--2014-10-24 09:21:40--  (try: 2)  https://libertymusicstore.net/store/sol-music/embed/
Connecting to libertymusicstore.net (libertymusicstore.net)|78.47.124.242|:443... connected.
WARNING: The certificate of ‘libertymusicstore.net’ is not trusted.
WARNING: The certificate of ‘libertymusicstore.net’ hasn't got a known issuer.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Content-Type: text/javascript
Length: unspecified [text/javascript]
Saving to: ‘index.html’

    [ <=>                                                                                      ] 0           --.-K/s   in 0s


Cannot write to ‘index.html’ (Operation timed out).



_______________________________________________
uWSGI mailing list
uWSGI@...
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
nitin chandra | 20 Oct 10:16 2014
Picon

Is there any issue with my configurations

Hi All,

below are the nginx-uwsgi.conf and project.ini files

q) Why does the new page not 'display' its content?

in the top URL field, insertDB.py script file name appears... but the
page content displayed is still of index.py page ..

===============================
nginx-uwsgi.conf
-----------------------
server {
  listen 81 default_server;
  server_name localhost;

  location / {
                root /home/nitin/project;
                index  index.py index.html index.htm;
  }

  location ~ \.py$ {
    include uwsgi_params;
    uwsgi_modifier1 9;
    uwsgi_pass 127.0.0.1:9090;
    uwsgi_param UWSGI_PYHOME /home/nitin/project;
    autoindex on;
    include fastcgi_params;
    fastcgi_pass 127.0.0.1:9090;
    fastcgi_index index.py;
    fastcgi_param SCRIPT_FILENAME /home/nitin/project$fastcgi_script_name;
  }
}

#/etc/uwsgi --http :9090 --http-modifier1 9 --ini
/homenitin/project/project.ini --master;

===================
project.ini
----------------
[uwsgi]
http-socket    = :9090
http-modifier1 = 9
plugin    = cgi
chdir = /home/nitin/project/
#module = interface
wsgi-file = index.py
master = yes
process   = 3
thunder-lock = yes
enable-threads = yes
#exit-on-reload = true
cgi = /home/nitin/project/
cgi-index = index.py
cgi-allowed-ext = .py
cgi-helper = .py=python
offload-threads = 8
vacuum = true
harakiri = 30
Stephen Hamer | 20 Oct 05:29 2014
Picon

accepting1-once writefifo race with master-fifo in "The Zerg Dance"

Hi,
I've been experimenting with uWSGI's graceful reloading. My toy example is in <https://github.com/shamer/uwsgi_rolling_restart>.

I've followed the "The Zerg Dance" instructions at <http://uwsgi-docs.readthedocs.org/en/latest/articles/TheArtOfGracefulReloading.html>. There seems to be a race between the hook-accepting1-once writefifo to the new.fifo and the master opening the master-fifo.

If I set the number of processes to spawn to a low number (experimentally I've found <4 to work on my machine) it works as expected. If I replace the "writefifo: new.fifo 1" with an "echo 1 > new.fifo" everything works as expected as well. With "echo" any number of processes works.

I'm using uWSGI version 2.0.7 on a 3.16.4 kernel. uWSGI was built with gcc 4.9.1. I'm running a python application. The python version is 3.4.2.

Is using "echo" in the accepting1-once hook the preferred way of doing this new.fifo -> running.fifo transition? Is there a way to get the "writefifo" method to work?

Thanks,
Stephen
_______________________________________________
uWSGI mailing list
uWSGI@...
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
nitin chandra | 15 Oct 16:33 2014
Picon

No action on form

Hi All,

I wrote a python script to load a web form. In my [wsgi] config i have given

[uwsgi]
http-socket    = :9090
plugin    = cgi
wsgi-file = /home/user/project/index.py
process   = 3
master = yes
thunder-lock = yes
enable-threads = yes
exit-on-reload = true
cgi = /home/nitin/finhealth
cgi-index = index.py
cgi-allowed-ext = .py
cgi-helper = .py=python

When I click on "Submit" button, Next page does not load.

Next Page shows If the data entered in the WebForm is correct, IF yes
insert into DB else cancel / Back.

Do I need to correct some thing in the uWSGI / Nginx config ?

Thanks

Nitin
ROMAHi4 | 14 Oct 16:37 2014
Picon

HARAKIRI: -- wchan> poll_schedule_timeout

Hello, uwsgi community.

We have used uwsgi 2.0.7 for a long time and everything was fine.
Today we have received following in logs.

Tue Oct 14 08:36:32 2014 - Respawned uWSGI worker 1 (new pid: 32683)
Tue Oct 14 08:36:32 2014 - mapped socket 0 (127.0.0.1:50031) to worker 1
Tue Oct 14 08:36:33 2014 - *** HARAKIRI ON WORKER 2 (pid: 32434) ***
Tue Oct 14 08:36:33 2014 - HARAKIRI: -- wchan> poll_schedule_timeout
Tue Oct 14 08:36:33 2014 - HARAKIRI: --- uWSGI worker 2 (pid: 32434) WAS managing request / since Tue Oct 14 08:36:33 2014 ---
{address space usage: 174055424 bytes/165MB} {rss usage: 48521216 bytes/

And it repeats all the time. Uwsgi just relaunches workers all the time...

hdd space - ok
ram amount - ok

Ubuntu 12.04
Django 1.6.6

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

uWSGI with PyPy

Dear uWSGI community,

I'm an experienced Python web developer but new to both uWSGI and PyPy. I'm interested in uWSGI and PyPy because a web application I'm building needs to serve a high volume of traffic and will use significant CPU per request.

I found the docs at http://uwsgi-docs.readthedocs.org/en/latest/PyPy.html but I'm having trouble sorting through all the available options. It sounds like I can use http://projects.unbit.it/downloads/pypy/libpypy-c-x86_64.so on an Ubuntu Trusty 64-bit server to avoid building/translating lbypypy-c myself, which would be preferable.

So how can I get from the libpypy-c-x86_64.so I downloaded to a new pypy virtualenv which uses that .so, into which I can (pip?) install uWSGI?

Thanks in advance for any help you can provide.
_______________________________________________
uWSGI mailing list
uWSGI@...
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
nitin chandra | 10 Oct 10:14 2014
Picon

Dynamin REloading / Refesh

Hi All,

I have been searching the net to find a solution to "Refresh" the web
page and see the latest development.

Else I am left with "Restarting" the uWSGI server every time.

# services uwsgi restart

To see the latest changes to the web page.

Can some one please point to the link giving this solution ?

Or  Suggest how to tweak the configuration ?

Thank

Nitin
Roberto Bampi | 8 Oct 17:19 2014
Picon

uwsgi in docker

Hi all,
we are trying to use uwsgi to host a django application in a docker [1] container.
Docker's main way to configure packaged application is to pass environment variables to them.
So I configured my django application to read most of the settings from os.environ but it seems like uwsgi does not pass the environment variables it receives from the parent to the children.
Is there a way to enable this behavior in uwsgi?

Regards,
Roberto Bampi

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

Gmane