about pserve --stop-daemon --pid-file

70 views
Skip to first unread message

Guohuang Chen

unread,
Apr 20, 2017, 11:16:40 PM4/20/17
to pylons-discuss
can pyramid 1.8.3(pyhton36) add the --stop-daemon --pid-file params again?
i use winSW wrap pyramid as service, i want to stop the service not by kill the task in the tasklist.

Bert JW Regeer

unread,
Apr 21, 2017, 12:20:05 PM4/21/17
to pylons-...@googlegroups.com
Hello,

We have removed all daemonization code from pserve. We recommend using a process manager like supervisord or systemd for managing the lifetime of the process. 

Bert JW Regeer

On Apr 20, 2017, at 19:14, Guohuang Chen <chen.g...@gmail.com> wrote:

can pyramid 1.8.3(pyhton36) add the --stop-daemon --pid-file params again?
i use winSW wrap pyramid as service, i want to stop the service not by kill the task in the tasklist.


--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To post to this group, send email to pylons-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/c1076828-6035-4164-a762-ff33abf98610%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Guohuang Chen

unread,
Apr 23, 2017, 8:08:04 PM4/23/17
to pylons-discuss
so can you commend a process manager tool under windows?

在 2017年4月22日星期六 UTC+8上午12:20:05,Bert JW Regeer写道:

Guohuang Chen

unread,
Apr 23, 2017, 8:11:33 PM4/23/17
to pylons-discuss
i find it. i will do after this to try it ,thank you. http://stackoverflow.com/questions/7629813/is-there-windows-analog-to-supervisord


在 2017年4月22日星期六 UTC+8上午12:20:05,Bert JW Regeer写道:
Hello,

Guohuang Chen

unread,
Apr 23, 2017, 10:53:45 PM4/23/17
to pylons-discuss
$ pip install supervisor
Collecting supervisor
  Downloading supervisor-3.3.1.tar.gz (415kB)
    Complete output from command python setup.py egg_info:
    Supervisor requires Python 2.4 or later but does not work on any version of Python 3.  You are using version 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)].  Please install using a supported version.

    ----------------------------------------
supervisor does not support python3 ?

在 2017年4月24日星期一 UTC+8上午8:11:33,Guohuang Chen写道:

Steve Piercy

unread,
Apr 24, 2017, 12:41:39 AM4/24/17
to pylons-...@googlegroups.com
It does not. See
http://supervisord.org/introduction.html#platform-requirements
and
https://github.com/Supervisor/supervisor#supported-platforms

You could use a different process manager as noted in the What's
New for Pyramid 1.6 Deprecations.
http://docs.pylonsproject.org/projects/pyramid/en/latest/whatsnew-1.6.html#deprecations

You could install a version of Python 2 on your system,
following the careful practice not to destroy your system's
Python. That could be tricky.

--steve


On 4/23/17 at 7:53 PM, chen.g...@gmail.com (Guohuang Chen) pronounced:
><https://groups.google.com/d/msgid/pylons-discuss/c1076828-6035-4164-a762-ff33abf98610%
>40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>
>

------------------------
Steve Piercy, Soquel, CA

Michael Merickel

unread,
Apr 24, 2017, 1:08:36 AM4/24/17
to Pylons
I sympathize that no one has given an option that works on windows with python 3. I only know of a few solutions:

1) Just stop trying to use a process manager inside your process manager. Use the windows service as is to start/stop things as it is intended to do.

2) Use python 2 to run supervisor. It can be used to run a python 3 process.

3) Maybe look at using gearbox[1] which is a version of pserve written by the turbogears folks. It still has the daemonization options in it and it is very likely it can be used to run pyramid apps.


- Michael


To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscribe@googlegroups.com.

To post to this group, send email to pylons-...@googlegroups.com.

Laurent DAVERIO

unread,
Apr 24, 2017, 3:38:41 AM4/24/17
to pylons-...@googlegroups.com
Maybe gunicorn could be used too. It is compatible with Python 3, and it
seems to have a daemon mode.

One trap I recently fell into, is that it's not compatible with:

> [server:main]
> use = egg:waitress#main
> listen = 127.0.0.1:6543 [::1]:6543

you have to use the old syntax, ie:

> [server:main]
> use = egg:waitress#main
> host = 0.0.0.0
> port = 6543

Hope this helps,

Laurent.
>> <https://groups.google.com/d/msgid/pylons-discuss/c1076828-6035-4164-a762-ff33abf98610%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout
>> <https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to pylons-discus...@googlegroups.com
> <mailto:pylons-discus...@googlegroups.com>.
> To post to this group, send email to pylons-...@googlegroups.com
> <mailto:pylons-...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pylons-discuss/c54ad61a-c7da-484f-a88a-d5302c904f75%40googlegroups.com
> <https://groups.google.com/d/msgid/pylons-discuss/c54ad61a-c7da-484f-a88a-d5302c904f75%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pylons-discus...@googlegroups.com
> <mailto:pylons-discus...@googlegroups.com>.
> To post to this group, send email to pylons-...@googlegroups.com
> <mailto:pylons-...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pylons-discuss/CAKdhhwGNiB3VMHzgojNePXnTakNVXWKPb%2BCvufYHFBxptkbCuQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/pylons-discuss/CAKdhhwGNiB3VMHzgojNePXnTakNVXWKPb%2BCvufYHFBxptkbCuQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Randall Leeds

unread,
Apr 24, 2017, 12:04:57 PM4/24/17
to pylons-...@googlegroups.com

Gunicorn does not support Windows yet.


Bert JW Regeer

unread,
Apr 24, 2017, 1:10:30 PM4/24/17
to pylons-...@googlegroups.com
Looking at it, the —stop-daemon would send a kill signal to the process, there was/is no extra processing that is done when that signal was sent, it would insta-kill the server.

Just having the windows service manager kill the task works just fine, and is what it is designed to do.

Bert

On Apr 20, 2017, at 19:14, Guohuang Chen <chen.g...@gmail.com> wrote:

can pyramid 1.8.3(pyhton36) add the --stop-daemon --pid-file params again?
i use winSW wrap pyramid as service, i want to stop the service not by kill the task in the tasklist.


--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To post to this group, send email to pylons-...@googlegroups.com.

Guohuang Chen

unread,
Apr 25, 2017, 4:14:05 AM4/25/17
to pylons-discuss
i finally use pserve+circus+winSW,thanks all! 

在 2017年4月21日星期五 UTC+8上午11:16:40,Guohuang Chen写道:
Reply all
Reply to author
Forward
0 new messages