Re: [uWSGI] reload mercy not working?

2013-04-12 Thread Roberto De Ioris

> To clarify:
>
> --reload-mercy - used when reloading/stopping whole uWSGI instance
> --worker-reload-mercy - used when reloading/stopping single worker
>
> Isn't Options.rst autogenerated using some script (the thing in _options
> dir I suspect)? It does that, but it has all uWSGI options redefined
> there,
> much better approach would be to extract all options from source and
> generate doc page with that. It shouldn't be much work, I'll try to write
> such script during weekend idleness.
>
>

I think the options generator in uwsgi-docs need a bit of work.

I have tried running it but it does not manage code, as we should pass it
a preprocessed code.

I think using a c parser is overkill as you can get the whole options list
with a single commandline:

(find . -name \*.c;find . -name \*.cc;find . -name \*.m) | xargs cat |
grep "no_argument,\|required_argument,\|optional_argument," | sed "s/(char
\*)//"

(the last sed is required for stripping non-const char cast from c++ files)

-- 
Roberto De Ioris
http://unbit.it
___
uWSGI mailing list
uWSGI@lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi


Re: [uWSGI] reload mercy not working?

2013-04-12 Thread C Anthony Risinger
i wrote something pretty nasty here:

http://lists.unbit.it/pipermail/uwsgi/2013-January/005346.html

...and the options.py stuff came up:

http://lists.unbit.it/pipermail/uwsgi/2013-February/005347.html

...but it served my purpose so i never investigated further.

my first attempt was to actually to dynamically modify/extract/munge the
uWSGI source to simply print all the commands options and exit... then i
could have compiled it and just ran it to get a dump.  i tried to recurse
thru all plugin directories, extract each plugin registration/setup
structure, and essentially cat it all together into a new binary...

needless to say, i didnt get it working quite right (though i believe it
was not technical reasons... i got wildly distracted trying to make it work
via sed *only*) but i think something along this route would be pretty
solid.

also, beyond documentation reasons, it would be spectacular if uWSGI could
dump it options in a compgen/COMPREPLY compatible way... it would very
useful in implementing shell completion, something i would like anyway :)


On Fri, Apr 12, 2013 at 2:26 AM, Łukasz Mierzwa  wrote:

> To clarify:
>
> --reload-mercy - used when reloading/stopping whole uWSGI instance
> --worker-reload-mercy - used when reloading/stopping single worker
>
> Isn't Options.rst autogenerated using some script (the thing in _options
> dir I suspect)? It does that, but it has all uWSGI options redefined there,
> much better approach would be to extract all options from source and
> generate doc page with that. It shouldn't be much work, I'll try to write
> such script during weekend idleness.
>
>
> 2013/4/12 Igor Katson 
>
>> cool, thanks Roberto, works like a charm.
>>
>> It should be probably documented here
>> http://uwsgi-docs.readthedocs.org/en/latest/Options.html
>>
>>
>>
>> On Fri, Apr 12, 2013 at 12:06 AM, Roberto De Ioris wrote:
>>
>>>
>>> > Hi,
>>> >
>>> > I have "reload-mercy = 5" set in the .ini file, but it seems to be
>>> still
>>> > 60, these are the messages from the log:
>>> >
>>> > our mercy for graceful operations on workers is 60 seconds
>>> > Fri Apr 12 10:56:44 2013 - worker 1 (pid: 19336) is taking too much
>>> time
>>> > to
>>> > die...NO MERCY !!!
>>> >
>>> > The second line appears only around a minute after restart.
>>> >
>>> > uWSGI version is 1.9.6, using gevent loop.
>>> >
>>> > Thanks for your reply,
>>> > Regards,
>>> >
>>> > Igor Katson.
>>> >
>>> > P.S. Roberto, thanks again for the awesome uWSGI!
>>> > ___
>>> > uWSGI mailing list
>>> > uWSGI@lists.unbit.it
>>> > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>>> >
>>>
>>> --worker-reload-mercy is what you need, reload-mercy is a global value
>>> used as a fallback
>>>
>>>
>>> --
>>> 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
>>
>>
>
>
> --
> Łukasz Mierzwa
>
> ___
> uWSGI mailing list
> uWSGI@lists.unbit.it
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
>


-- 

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


Re: [uWSGI] reload mercy not working?

2013-04-12 Thread Łukasz Mierzwa
To clarify:

--reload-mercy - used when reloading/stopping whole uWSGI instance
--worker-reload-mercy - used when reloading/stopping single worker

Isn't Options.rst autogenerated using some script (the thing in _options
dir I suspect)? It does that, but it has all uWSGI options redefined there,
much better approach would be to extract all options from source and
generate doc page with that. It shouldn't be much work, I'll try to write
such script during weekend idleness.


2013/4/12 Igor Katson 

> cool, thanks Roberto, works like a charm.
>
> It should be probably documented here
> http://uwsgi-docs.readthedocs.org/en/latest/Options.html
>
>
>
> On Fri, Apr 12, 2013 at 12:06 AM, Roberto De Ioris wrote:
>
>>
>> > Hi,
>> >
>> > I have "reload-mercy = 5" set in the .ini file, but it seems to be still
>> > 60, these are the messages from the log:
>> >
>> > our mercy for graceful operations on workers is 60 seconds
>> > Fri Apr 12 10:56:44 2013 - worker 1 (pid: 19336) is taking too much time
>> > to
>> > die...NO MERCY !!!
>> >
>> > The second line appears only around a minute after restart.
>> >
>> > uWSGI version is 1.9.6, using gevent loop.
>> >
>> > Thanks for your reply,
>> > Regards,
>> >
>> > Igor Katson.
>> >
>> > P.S. Roberto, thanks again for the awesome uWSGI!
>> > ___
>> > uWSGI mailing list
>> > uWSGI@lists.unbit.it
>> > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>> >
>>
>> --worker-reload-mercy is what you need, reload-mercy is a global value
>> used as a fallback
>>
>>
>> --
>> 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
>
>


-- 
Łukasz Mierzwa
___
uWSGI mailing list
uWSGI@lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi


Re: [uWSGI] reload mercy not working?

2013-04-12 Thread Igor Katson
cool, thanks Roberto, works like a charm.

It should be probably documented here
http://uwsgi-docs.readthedocs.org/en/latest/Options.html



On Fri, Apr 12, 2013 at 12:06 AM, Roberto De Ioris  wrote:

>
> > Hi,
> >
> > I have "reload-mercy = 5" set in the .ini file, but it seems to be still
> > 60, these are the messages from the log:
> >
> > our mercy for graceful operations on workers is 60 seconds
> > Fri Apr 12 10:56:44 2013 - worker 1 (pid: 19336) is taking too much time
> > to
> > die...NO MERCY !!!
> >
> > The second line appears only around a minute after restart.
> >
> > uWSGI version is 1.9.6, using gevent loop.
> >
> > Thanks for your reply,
> > Regards,
> >
> > Igor Katson.
> >
> > P.S. Roberto, thanks again for the awesome uWSGI!
> > ___
> > uWSGI mailing list
> > uWSGI@lists.unbit.it
> > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
> >
>
> --worker-reload-mercy is what you need, reload-mercy is a global value
> used as a fallback
>
>
> --
> 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


Re: [uWSGI] reload mercy not working?

2013-04-12 Thread Roberto De Ioris

> Hi,
>
> I have "reload-mercy = 5" set in the .ini file, but it seems to be still
> 60, these are the messages from the log:
>
> our mercy for graceful operations on workers is 60 seconds
> Fri Apr 12 10:56:44 2013 - worker 1 (pid: 19336) is taking too much time
> to
> die...NO MERCY !!!
>
> The second line appears only around a minute after restart.
>
> uWSGI version is 1.9.6, using gevent loop.
>
> Thanks for your reply,
> Regards,
>
> Igor Katson.
>
> P.S. Roberto, thanks again for the awesome uWSGI!
> ___
> uWSGI mailing list
> uWSGI@lists.unbit.it
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>

--worker-reload-mercy is what you need, reload-mercy is a global value
used as a fallback


-- 
Roberto De Ioris
http://unbit.it
___
uWSGI mailing list
uWSGI@lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi