On 5 April 2017 at 17:40, Glenn Jones wrote:
> Is there a way to get uwsgi running in emperor mode to exec a completely
> fresh
> vassal process after chrooting? Here is the background of what we're trying
> to
> do any why:
--emperor-wrapper ?
ps.
afaik, the emperor doesn't fork vassals, it for
On 11 December 2017 at 23:56, Larry Martell wrote:
> I am running on CentOS 7, which has a default python of 2.7.5. I want
> to run uWSGI with 2.5.13, which I have downloaded. From a shell I need
> to run this to enable the other version:
>
> scl enable python27 bash
>
> I tried modifying /etc/sys
On 8 August 2018 at 16:17, Michael Ströder wrote:
> HI!
>
> I'm using uwsgi for starting WSGI Python apps.
>
> uwsgi itself is started with a systemd unit which also mandates that an
> AppArmor profile is load for that unit.
>
> Although I'm using pretty tight AppAmor profiles everything works.
>
On Mon, 17 Jun 2019 at 23:27, Tamer Higazi wrote:
> Hi people,
>
> I am not getting smart. Can somebody explain me this ?
> Python 3.7 was compiled with this configure statement:
>
> ./configure --enable-ipv6 --with-system-ffi --enable-shared
>
> Any ideas what could there be wrong ?
>
>
> best,
> You cannot use curl in that way (it will wait for the whole output).
> This is common even for some browser (safari for example requires a
> minimal amount of data before sending output).
>
> There is a flag to turning off buffering in curl:
>
> curl -N -i http://localhost:8080
I was under the i
>> Trying this, and also 1.1 with the gevent example ./tests/ugevent.py I
>> only get the full response once it's all done, it's not streamed to the
>> client.
>
> curl -N -i http://localhost:8080
>
> should do the trick
Now that I have a working example with --http-socket how do I need to
configu
>> curl -N -i http://localhost:8080
>>
>> should do the trick
>
> Now that I have a working example with --http-socket how do I need to
> configure nginx when using the uwsgi protocol?
ok, I've found 'uwsgi_buffering' needs to be set to 'off'
maybe these 2 things should be mentioned on the Gevent
> I'm having an impossible time getting a Flask app to see any environment
> variables I try and pass through from nginx using the "uwsgi_param
> UWSGI_SETENV VARNAME=FOO" method.
>
> Trying to access these vars via os.environ['VARNAME'] always throws a
> KeyError exception. Interestingly, passing
I have an app that started segfaulting yesterday. In trying to find
what's the problem is I've simplified it to this config file, and I
still get segfaults. I did recompile uwsgi, still the same. Any idea
what could be this?
[uwsgi]
master = true
daemonize = %d/log/uwsgi.log
touch-reload = %p
thre
> Be sure you are not loading the python plugin from another build.
>
> Try building a monolithic version.
Built a monolithic version and it works.
But, I'm sure that the python plugin was correct.
I was deleting the whole /usr/local/lib/uwsgi/ directory
--
damjan
> But, I'm sure that the python plugin was correct.
> I was deleting the whole /usr/local/lib/uwsgi/ directory
With the help of the irc channel we found the problem.
I was building a modular uwsgi with
python uwsgiconfig.py --build package
and
python uwsgiconfig.py --plugin plugins/python core py
>>
>> Actually this is still not fixed in 1.4.5 or HEAD in 1.4
>
> use the newer uwsgidecorators (committed in 1.4), the previous one, did
> not catch the exception forcing the post_fork hook to continue calling the
> classing mule handler.
>
>>
>> 1.5 HEAD 50891 on the other hand does restart but
I'm trying to jail mediawiki on Linux by using the unshare support in uwsgi.
I want to setup the chroot in /srv/mediawiki, which has /app /var /proc
/dev direcotries. Mediawiki is installed from package in
/usr/share/webapps/mediawiki, and I try to bind mount that to /app
Following are my uwsgi
>
> The Arch ones seem like they got copied from the RPM spec for fedora,
> which I
> wrote. A brief explanation:
>
- uwsgi_ruby20_compatibility.patch because fedora ships with ruby20
>now
>
Arch too comes with ruby 2.0, but uwsgi-plugin-rack builds even without
that patch
> - uwsgi_trick_
it seems the release is not tagged on github
(and I use the release tarballs that github provides)
On 26 February 2014 17:24, Roberto De Ioris wrote:
> Hi everyone, a tiny minor bugfix release is available:
>
> http://uwsgi-docs.readthedocs.org/en/latest/Changelog-2.0.2.html
>
> Users of CGI an
Anyone using logstash to collect uwsgi logs?
What are some best practices when configuring uwsgi - or for that matter
logstash too.
Especially wrt tracebacks from python, ruby and php applications which are
often multiline.
--
damjan
___
uWSGI mailing
On 18 March 2014 01:07, Damjan Georgievski wrote:
> Anyone using logstash to collect uwsgi logs?
> What are some best practices when configuring uwsgi - or for that matter
> logstash too.
>
> Especially wrt tracebacks from python, ruby and php applications which are
> often mul
>> The claim on http://uwsgi-docs.readthedocs.org/en/latest/Logging.html that
>> ... logger = file:/tmp/foobar # This logger will log everything as
>> it's not named ...
>>
>> seems to not be true, it doesn't log to tty like that
>>
>
> can't reproduce the problem:
>
> ./uwsgi --logger file:/dev/t
> i'm a complete newby to uwsgi, so sorry if i'm overlooking something
> obvious.
>
> I've recompiled uwsgi 2.0.3 along with php plugin and i'm trying to have
> $PHP_INI_SCAN_DIR system variable passed to underlying php instance (5.3.3)
> in order to have a given directory scanned for additional in
I'm trying to setup a fastrouter with a fallback that in the same
process/config. Should this config work, because it doesn't for me:
The fastrouter just closes the connection to nginx as if it didn't
have a fallback.
[uwsgi]
master = true
plugin = fastrouter
fastrouter = @fastrouter
fastrouter-
> I have added the --fastrouter-fallback-on-no-key option/flag
>
> https://github.com/unbit/uwsgi/commit/84d6f54ddd879650cf4b0d827598630e629e0496
>
> unfortuately i do not think it can be added flawlessly to the httprouter too
> (eventually it is something for 2.1 branch)
>
works fine
--
damj
> I've just released mysqlclient-python 1.3.2
>
> https://pypi.python.org/pypi/mysqlclient
>
> This is a fork of MySQL-python.
> New feature introduced in 1.3.2 is asyncio+coroutine friendness.
>
> Here is example with gevent:
> https://github.com/PyMySQL/mysqlclient-python/blob/master/samples/wait
On 11 September 2014 01:15, Jacob Rief wrote:
> When building Docker containers, one must run services such as nginx, sshd
> and uwsgi controlled by supervisord.
http://jpetazzo.github.io/2014/06/23/docker-ssh-considered-evil/
"If you run SSHD in your Docker containers, you're doing it wrong!"
> location /project/ {
> include uwsgi_params;
> uwsgi_pass 127.0.0.1:9090;
...
> [uwsgi]
> http-socket= :9090
You can't use uwsgi_pass with http-socket
--
damjan
___
uWSGI mailing list
uWSGI@lists.unbit.it
http://lists.unbit.it/cgi-bin/
On 8 October 2014 17:19, Roberto Bampi wrote:
> 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 t
On 11 November 2014 15:34, Rui Pacheco wrote:
> I have a Flask app running behind uwsgi 2.0.8. Startup logs seem to be ok
> except for a problem: whenever I hit a URI on my app I always get a 404. I
> can see in the uwsgi logs that 0 bytes were returned and on the nginx logs
> that the URI was
On 8 December 2014 at 16:52, Jean-Baptiste Quenot wrote:
> Hello fellow UWSGI supporters,
>
> I'm struggling with an issue in my PHP software (namely Pimcore).
>
> The PHP stuff is served through an Haproxy -> Nginx -> UWSGI stack that runs
> without a hitch since 18 months.
>
> A few days ago, af
Reading about asyncio in uwsgi at
http://uwsgi-docs.readthedocs.org/en/latest/asyncio.html
I really didn't like the ugly explicit switching, passing the greenlet
around and the future. So I made this simple decorator that hides that
away:
def coroutine(f):
def _f(*args, **kwargs):
myse
om sleeping()
return [response]
On 1 February 2015 at 22:20, Damjan Georgievski wrote:
> Reading about asyncio in uwsgi at
> http://uwsgi-docs.readthedocs.org/en/latest/asyncio.html
>
> I really didn't like the ugly explicit switching, passing the greenlet
> around and
I've made some improvements and comments here
https://gist.github.com/gdamjan/b417ad54e59073a112ba
the second approach basically delegates the uwsgi/greenlet worker to
an asyncio coroutine and from then on everything is asyncio.
the shortcoming of the first approach is that you can be easily foo
> I'm writing a Django application and want to use some extra facilities of
> uWSGI.
>
> I'd like to use the @timer decorator to periodically execute some
> "offline" processes, like scanning a directory and adding to a
> database. But if I include the file that defines this function from
> my mo
> In my scenario, the emperor is running as root, as expected, but the vassal
> processes end up running as another user on our test server, not www-data.
> However, if remove the "emperor-tyrant = true" from the emperor
> configuration, the vassals do run as using the www-data user, as specified
>
>> > In my scenario, the emperor is running as root, as expected, but the
>> > vassal
>> > processes end up running as another user on our test server, not
>> > www-data.
>> > However, if remove the "emperor-tyrant = true" from the emperor
>> > configuration, the vassals do run as using the www-dat
I'm using msgpack logging to logstash, as here
http://uwsgi-docs.readthedocs.org/en/latest/LogEncoders.html#the-msgpack-encoder
Is it possible to add fields for the response time and http status to
the log message structure?
My current encoder is set as:
log-encoder = msgpack:logstash
map:4|
it'll be in the request.environ dictionary.
do you use proxy_pass or uwsgi_pass in the nginx config?
On 29 May 2015 at 11:01, Jerry OELoo wrote:
> Hi.
> I am using Nginx + uWSGI + Flask for web service.
> Now use Nginx upload module to support file upload. and set file name in
> X-FILE.
>
> pro
I have no idea what the correct behaviour here is, but at least Slim
the PHP framework fails when used with --php-app, and it complains
about the empty SCRIPT_NAME
SCRIPT_NAME seems to be empty in uwsgi in both cases on the uwsgi
level, but when in php in the first case (php-app) it's again empty,
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
___
uWSGI mailing list
uWSGI@lists.unbit.it
there's also this, https://github.com/unbit/uwsgi/tree/master/plugins/cplusplus
I don't know if it helps you
On 23 October 2015 at 21:49, Bo Lorentsen wrote:
> Hi ...
>
> I am quite new to uwsgi and this list, so I am sorry if this has been asked
> before.
>
> I like to make a C++ plugin, using t
I think the indentation in the example is wrong for the "async for msg
in ws:" block.
btw,
how does this work?
what parses the uwsgi protocol?
since you map the socket fds to the aiohttp.web.make_handler handler
wont that expect http?
On 3 November 2015 at 10:19, Roberto De Ioris wrote:
> Hi,
On 12 November 2015 at 09:14, est wrote:
> hello list,
>
> I have this django+uwsgi project need to ship to a client. I wanna make sure
> it's dead simple as possible, something like copy package, run package and
> viola would be awesome.
>
>
> So I looked into this, setuptools installs package to
On 1 December 2015 at 13:55, Curtis wrote:
> On 01/12/15 23:42, alonn wrote:
>
>> Example configuration for different apps
>>
>> [uwsgi]
>> socket = /tmp/rest.sock
>> chmod-socket = 664
>> uid = www-data
>> gid = www-data
>> master = true
>> processes = 4
>> threads = 25
>>
>
> This may be a sill
Below is my config (.ini) file.
Requesting the /_auth url should hit my application, all other urls should
redirect to /_auth
The problem is, even a request to /_auth is redirected to /_auth and
`redirect will happen` shows up in the log.
This only happens when I use the `mount` option, not for e
I've found that an empty string returned from a rpc function would stop a
request with a 500 error
for ex:
@rpc('myrpc')
def myrpc():
return b""
and
route-run= rpcvar:TEST myrpc
will just end the request as soon the rpcvar route is invoked. The empty
string goes back to uwsgi as NULL at
On 18 December 2015 at 16:34, Damjan Georgievski wrote:
> Below is my config (.ini) file.
>
> Requesting the /_auth url should hit my application, all other urls should
> redirect to /_auth
>
> The problem is, even a request to /_auth is redirected to /_auth and
> `redirect
On 2 January 2016 at 08:37, Thomas Glanzmann wrote:
> Hello,
> I had to host a potential unsecure PHP web application. So I though about
> writing a small c programm which creates a network, filesystem, pid,
> uts, and ipc namespace and run php-fpm inside it.
Since you're on jessie, you can also
>
> if you have a file descriptor open you can unlink the file from the
> filesystem, the file will be actually removed once the fd is closed.
> Wouldn't uwsgi cleanup my psgi application before passing name to an
> "offload thread"? Also, afaik unlinking with open fd would make file not
> access
if you have a file descriptor open you can unlink the file from the
filesystem, the file will be actually removed once the fd is closed.
On 18 March 2016 at 10:50, Руслан Закиров wrote:
> Hi,
>
> I've setup an app that serves files after processing using sendfile and I
> want to remove them afte
> I should also say that I have only SSH access to the Debian machine,
that's all you need.
> Windows computer to access the Debian one, with SSH for direct access and
> Firefox to test web serving. Unfortunately, I can't copy text from SSH
> output to paste here, nor can I paste into SSH. Any ou
On 10 May 2016 at 17:22, Alex Hall wrote:
> Hi all,
> I feel pretty bad that I have to ask this at all, but where's my UWSGI main
> ini file get to? I thought I had it in /etc/uwsgi, but it's not there.
> Starting UWSGI fails, and I don't know why as the log is empty (as usual).
> Some forum sugge
On 11 May 2016 at 20:07, Alex Hall wrote:
> Hi all,
> Sometimes, when I start my uwsgi from an ini file in which a log file is
> specified, I get an error 288. This says that permission to write to the log
> file was denied. The file is
> /var/log/uwsgi/myapp.log
> and I've done
> chown www-data /
On 6 June 2016 at 19:01, Larry Martell wrote:
> I have successfully deployed django1.6 with uwsgi and nginx on RHEL6
> but I cannot seem to get it working on RHEL7.
>
> I get Internal Server Error in the browser, and this in the uwsgi log:
the main thing here beeing:
--- no python application fou
I need to debug a php application running in uwsgi,
what's the best way to write to stderr from php itself?
ps.
for some reason I don't get any output from the error_log() function
--
damjan
___
uWSGI mailing list
uWSGI@lists.unbit.it
http://lists.unbi
> There is so much information on the uWSGI site, I almost feel ashamed to
> ask this question...
>
> I have a shared account on Dreamhost, and was able to install uWSGI with
> the instructions from the uWSGI page. Werkzeug is showing correctly.
>
> I also downloaded web2py, and uncompressed it (on
On 10 September 2016 at 01:07, Jay Wineinger
wrote:
> I have installed uwsgi via pip and am trying to use the
> stats_pusher_statsd plugin. It does not seem available by default, so I had
> to download the source for my version and execute uwsgi --build-plugin to
> build it.
>
> # uwsgi --build-p
> In addition to this, i have seen a bunch of blog-posts about the 2.1
> release, or better its non-release :) Yes it is on development by 2 years,
> and 2.0 is basically cherry-picking from it. It has lot of interesting
> features and removes some of the stupid decisions i made at the start of
> t
On 25 February 2017 at 01:05, Curtis Maloney wrote:
> You probably want to also include in such security advice:
I wish, more php applications would work with the `php-app =` option,
i.e. they have a single file as entry-point.
When I host php apps nowdays I typically look at using the applicait
This is how I run my django applications in cherokee
First the cherokee config is simple, I run a local interpreter
(cherokee starts the web app) as user damjan:
r...@jeos:~# grep '!11!' /etc/cherokee/cherokee.conf
source!11!env_inherited = 0
source!11!host = 127.0.0.1:37116
source!11!interpreter
> Documentation available:
>
> http://projects.unbit.it/uwsgi/wiki/UseCgroups
>
> Thanks for testing (and abusing) it
This is certainly an interesting thing, but maybe in the near future
we could be using systemd to start uwsgi instances and set the
cgroups.
Anyway, from what I've read on LKML re
> uWSGI 0.9.6.5 is available
>
> http://projects.unbit.it/downloads/uwsgi-0.9.6.5.tar.gz
Do you also keep the stable 0.9.6.x versions in mercurial?
btw.
I'd like to try and implement dynamic .wsgi loading, similar to how
uwsgi can now dynamically load .py files based on UWSGI_SCRIPT in the
reques
> It looks to me as there are some trouble parsing my german located env.
> I don't know If this is an error on arch linux or uwsgi, but maybe it
> helps to make uwsgi better.
> You can make it compatible to this kind of output and add an unittest
> or something for it would be great.
ot it can ju
>> I have (still) not added support for magic vars (%s, %n ...) as i have
>> just added them to ini/xml/yaml parsing. So independently from the Emperor
>> you can use the following vars in your config files:
>>
>> %s the filename of the config file
>> %o the original string passed to --xml/--yaml/-
>> The error that I'm getting is that Django doesn't generate the links
>> corectly. I guess it doesn't get SCRIPT_NAME right.
>
> It seems that Django is at fault here, I've replaced the Django app with
> werkzeug's test_app and SCRIPT_NAME and PATH_INFO are correct, so it seems
> Django doesn't h
I tried to build with xml = false in the buildconf .ini file. The build failed.
Here's a patch to correct that:
http://paste.pocoo.org/show/327861/
the noop "if (0) {}" is needed so that the later "else if" statements
have a starting "if" when xml is not used
--
damjan
_
>> - first of all, the for(;;) endless loop for starting a namespace is too
>> aggressive. If there's any error in the namespaced child, it'll take
>> 100% of a cpu. Some kind of backoff would be required here (although
>> that comes close to an implementation of an init system)
>
> The only thing
> Thanks to this new system, uGreen is now less than 80 lines of code, and
> support for python greenlet has been added in only 50 lines (!!!).
Does this mean that I can now use gevent APIs with uwsgi?
--
damjan
___
uWSGI mailing list
uWSGI@lists.unbi
65 matches
Mail list logo