Michael Graham | 2 Sep 15:35 2015

Async test deadlock with threads = true

Hi all,

I have just started looking at uwsgi for websockets and was interested
in using async.  I ran the test from:

https://github.com/unbit/uwsgi/blob/master/tests/websockets_chat_async.py

And it deadlocks in PyThread_acquire_lock as soon as a second browser
window opens.

Is this the expected behaviour when running async and threads?

Thanks,
--

-- 
Michael Graham <mgraham@...>
Francesco Amelio | 2 Sep 15:14 2015
Picon

No such file or directory [core/utils.c line 3607]

Dear All,
we have an issue after a graceful restart in a chrooted uwsgi application.

After the touch, the app is trying to restart but fails because can't find the INI file of the vassal.
The INI file is outside the chroot, while the touchfile not.

After the error (no such file or directory), the vassal dies and the master process waits long time before restarting it.

Should the INI file be in the chroot as it's the uwsgi binary or we need to add an extra conf directive?

Here the extract from log:

Tue Sep  1 09:21:48 2015 - *** /home/user/domain/uwsgi.ini has been touched... grace them all !!! ***
...gracefully killing workers...
Gracefully killing worker 2 (pid: 18661)...
worker 2 buried after 1 seconds
binary reloading uWSGI...
chdir() to /opt/uwsgi
closing all non-uwsgi socket fds > 2 (max_fd = 1024)...
found fd 3 mapped to socket 0 (/home/user/.socks/uwsgi-domain-app.sock)
running /opt/uwsgi/uwsgi
*** has_emperor mode detected (fd: 12) ***
realpath() of user-domain-app.ini failed: No such file or directory [core/utils.c line 3607]
*** Starting uWSGI 2.0.9 (64bit) on [Tue Sep  1 11:24:01 2015] ***
compiled with version: 4.8.2 on 14 March 2015 23:23:42
os: Linux-3.14.32-xxxx-grs-ipv6-64 #1 SMP Sat Feb 7 11:35:27 CET 2015
nodename: <hostname>
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /opt/uwsgi
writing pidfile to /home/user/tmp/uwsgi-domain-app.pid
detected binary path: /opt/uwsgi/uwsgi
*** dumping internal routing table ***
_______________________________________________
uWSGI mailing list
uWSGI@...
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
Alexandre Rossi | 27 Aug 10:48 2015
Picon

running a PHP app in a subdirectory with apache, uwsgi and the php plugin

Hi,

I'm using apache with mod_proxy_uwsgi as a webserver with the
following configuration:
    ProxyPass "/r/" "unix:/var/run/uwsgi/reader.socket|uwsgi://localhost/"

The unix domain socket (UDS) configuration is ignored
(https://github.com/unbit/uwsgi/issues/890), so I configured for the
time being uwsgi to listen on TCP.

But even then, I cannot manage to configure the router_rewrite plugin
to get a PHP application to work in a subdirectory. The relevant part
of my conf are below:
    [uwsgi]
    master = True
    plugins = 0:php

    project_dir = /srv/www/selfoss
    chdir = %(project_dir)
    php-docroot = %(project_dir)
    php-allowed-ext = index.php
    php-index = /index.php

    plugins = router_rewrite
    route-uri = ^/r/(.*) rewrite:/index.php/$1

It seems that the both mod_proxy_uwsgi and the router_rewrite plugin
pass the /r/ prefix to the PHP script.

What am I doing wrong?

Thanks,

Alex
Ryan Cox | 26 Aug 04:14 2015

Access to multiple caches via Python


Hullo!

My understanding is that multiple caches are possible by adding multiple cache2 options, as long as each are named uniquely.  However, it appears that the python module's cache_set and cache_get are only able to access the cache listed first.  I'm not aware of a parameter for the cache's name.   I see that the php module supports cache name in the getter, function.  Is there a way to achieve this via Python as well?

I'm using Python 3 and uWSGI 2.0.11.  
The documentation I'm looking at is:

Many thanks!


--
Ryan Cox
Team Lead / Sr Platform Engineer
StudioNow SF
408.459.9879
_______________________________________________
uWSGI mailing list
uWSGI@...
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
Andrew Stuart | 19 Aug 02:54 2015
Picon

Is it possible to proxy requests to some other server only after running auth logic

Hello

I have several application servers at the back end.

I want all inbound requests to go through some authentication and authorization logic.

I’m wondering is it possible to have a wsgi application that does the auth logic, and if the auth logic
succeeds, then the request is proxied on to some other server (perhaps a remote server or perhaps a local
wsgi application) for execution?

thanks

as

_______________________________________________
uWSGI mailing list
uWSGI <at> lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
Jerry OELoo | 18 Aug 09:39 2015
Picon

Can I get improvement via gevent

Hi:
I am using uWSGI + Flask to provide a web API, Currently, I am using
processes + threads working mode.
When get a query request from client, The Web API will call C so
library API via ctypes, the C API will do some network I/O operation,
the total time is around 0.1s. Maybe I will have 1k+ client query
server at same time.

Recently I know gevent which can support cocurrent well, So is
processes + gevent suitable than processes + threads for my scenario?
Thanks~

--

-- 
Rejoice,I Desire!
Hermann Calabria | 17 Aug 23:17 2015

Emperor: Repeated "announcing my loyalty to the Emperor"

Hi, I’m using uwsgi running two psgi Perl Dancer apps under the Emperor.

Is it normal for uwsgi vassals to repeatedly announce their loyalty to the 
Emperor, upon nearly every request?

Here's a small portion of my uwsgi.log file:

announcing my loyalty to the Emperor...
Mon Aug 17 20:51:59 2015 - [emperor] vassal www.ini is now loyal [pid: 
1713|app: 0|req: 4/11] 0.0.0.0 () {44 vars in 873 bytes} [Mon Aug 17 
20:52:12 2015] GET /sitemap-index.xml => generated 284 bytes in 7 msecs 
(HTTP/1.1 200) 4 headers in 146 bytes (0 switches on core 0)
[pid: 1706|app: 0|req: 2/12] 0.0.0.0 () {42 vars in 808 bytes} [Mon Aug 17 
20:52:22 2015] GET / => generated 113840 bytes in 207 msecs (HTTP/1.1 200) 4 
headers in 143 bytes (0 switches on core 0)
[pid: 1709|app: 0|req: 1/13] 0.0.0.0 () {42 vars in 844 bytes} [Mon Aug 17 
20:52:35 2015] GET /about => generated 124031 bytes in 1325 msecs (HTTP/1.1 
200) 4 headers in 143 bytes (0 switches on core 0)
announcing my loyalty to the Emperor...
Mon Aug 17 20:52:36 2015 - [emperor] vassal www.ini is now loyal
[pid: 1713|app: 0|req: 5/14] 0.0.0.0 () {44 vars in 865 bytes} [Mon Aug 17 
20:52:38 2015] GET / => generated 113840 bytes in 129 msecs (HTTP/1.1 200) 4 
headers in 143 bytes (0 switches on core 0)

These announcements of loyalty to the Emperor appear to occur with nearly 
every request.

Are these poor vassals trying to kiss up to the Emperor for special favors, 
or (more likely) is there something wrong with my configuration?

Thanks in advance,
Hermann

FYI, crossposted here:
http://stackoverflow.com/questions/32059663/uwsgi-deployment-using-emperor-repeated-announcing-my-loyalty-to-the-emperor

_______________________________________________
uWSGI mailing list
uWSGI <at> lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
月忧茗 | 16 Aug 06:59 2015
Picon

does reload-on-rss work on mule process?


I noticed that mule process use a lots of memory

and the docs say:

reload-on-rss

argument: required_argument

parser: uwsgi_opt_set_megabytes

flags: UWSGI_OPT_MEMORY

help: reload if rss memory is higher than specified megabytes



does this will work on all type processes?
work, mule, spooler ?
_______________________________________________
uWSGI mailing list
uWSGI@...
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
David Montgomery | 11 Aug 12:25 2015
Picon

uwsgi is not working with flask

Hi,

I cant get uWSGI to work with flask sad to say. Below is my error.


Traceback (most recent call last):
  File "/var/feed-uiserverside/wsgi.py", line 10, in <module>
    from app import app
ImportError: No module named app
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 30409)
spawned uWSGI worker 1 (pid: 30410, cores: 20)
*** running gevent loop engine [addr:0x47df60] ***


Here is how I start via supervisor

[program:frontend]
environment=PYTHONPATH=/var/feed-uiserverside/
autostart=true
autorestart=true
process_name = frontend-%(process_num)s
command = /usr/local/bin/uwsgi --yaml /var/frontend.uwsgi.yaml
--port=%(process_num)s
--log_file_prefix=%(here)s/logs/%(program_name)s-%(process_num)s.log
numprocs_start = 8030

[group:frontend_server]
programs=frontend

uwsgi:
  pidfile: /var/run/frontend.pid
  loop: gevent
  gevent: 20
  carbon: <%= <at> carbon_ip_address%>:2003
  socket: 127.0.0.1:8030
  processes: <%= node["cpu"]["total"] %>
  b: 32768
  master: true
  enable-threads: true
  listen: 100
  logto2: /tmp/frontend.log
  touch-reload: /var/feed-uiserverside/wsgi.py
  master-fifo: /tmp/uwsgi_frontend_master_fifo
  wsgi-file: /var/feed-uiserverside/wsgi.py
  pp: [/var/feed-uiserverside/,/var/feed-uiserverside/app/]
 














_______________________________________________
uWSGI mailing list
uWSGI@...
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
José Antonio Aguilar | 10 Aug 16:48 2015

Install uWSGI+nginx+django


Hello

You have the how to install nginx + uwsgi + django in ubuntu14?


This link does not have much information:
https://www.linode.com/docs/websites/nginx/wsgi-using-uwsgi-and-nginx-on-ubuntu-12-04-precise-pangolin

Thanks
_______________________________________________
uWSGI mailing list
uWSGI@...
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
Damjan Georgievski | 30 Jul 15:38 2015
Picon

tracing php app execution

Is it possible to trace the execution of a PHP webapp?

owncloud is returning me an HTTP 500 error but it doesn't log
anything, and I want to find out where it does that.

what are my debug options?

--

-- 
damjan

Gmane