daemonize icon indicating copy to clipboard operation
daemonize copied to clipboard

Daemonize does not work with requests library

Open tomgross opened this issue 5 years ago • 3 comments

The following code fails on my Mac OS X in daemon but not in foreground mode:

import requests

def main():
    while True:
        requests.get('https://httpbin.org/get')
        sleep(10)

daemon = Daemonize(app="demo_app", pid="/tmp/demo_app.pid", action=main)
daemon.start()

I'm using Python 3.8.5, daemonize 2.5.0 and requests 2.24.0

tomgross avatar Aug 29 '20 09:08 tomgross

It would be beneficial to see how it fails, what error or traceback is produced.

miigotu avatar Aug 02 '21 08:08 miigotu

https://github.com/thesharp/daemonize/issues/75#issuecomment-890829014

miigotu avatar Aug 02 '21 08:08 miigotu

In general, fork() is very broken on OSX, so this issue might be caused by that. Can you look at Console.app and include the traceback, per the instructions in #75 ?

nickodell avatar Aug 02 '21 13:08 nickodell