You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
once it is running, edit app.py changing the response to something else and uwsgi will crash:
$ ./venv/bin/uwsgi --py-autoreload 1 --http :9001 --wsgi-file app.py*** Starting uWSGI 2.0.20 (64bit) on [Wed Aug 31 09:36:22 2022] ***compiled with version: 8.3.1 20190311 (Red Hat 8.3.1-3) on 11 November 2021 18:14:15os: Linux-5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022nodename: asottile-sentrymachine: x86_64clock source: unixpcre jit disableddetected number of CPU cores: 5current working directory: /tmpdetected binary path: /usr/bin/python3.10your processes number limit is 31521your memory page size is 4096 bytesdetected max file descriptor number: 1024lock engine: pthread robust mutexesthunder lock: disabled (you can enable it with --thunder-lock)uWSGI http bound on :9001 fd 4uwsgi socket 0 bound to TCP address 127.0.0.1:37915 (port auto-assigned) fd 3Python version: 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]--- Python VM already initialized ---Python main interpreter initialized at 0x55e1587d1140python threads support enabledyour server socket listen backlog is limited to 100 connectionsyour mercy for graceful operations on workers is 60 secondsmapped 145808 bytes (142 KB) for 1 cores*** Operational MODE: single process ***WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x55e1587d1140 pid: 7104 (default app)*** uWSGI is running in multiple interpreter mode ***spawned uWSGI master process (pid: 7104)spawned uWSGI worker 1 (pid: 7105, cores: 1)spawned uWSGI http 1 (pid: 7106)Python auto-reloader enabled[pid: 7105|app: 0|req: 1/1] 127.0.0.1 () {28 vars in 296 bytes} [Wed Aug 31 09:36:25 2022] GET / => generated 11 bytes in 0 msecs (HTTP/1.1 200) 1 headers in 44 bytes (1 switches on core 0)[uwsgi-python-reloader] module/file app.py has been modifiedgateway "uWSGI http 1" has been buried (pid: 7106)...gracefully killing workers...Gracefully killing worker 1 (pid: 7105)...worker 1 buried after 1 secondsbinary reloading uWSGI...chdir() to /tmpclosing all non-uwsgi socket fds > 2 (max_fd = 1024)...found fd 3 mapped to socket 0 (127.0.0.1:37915)running /usr/bin/python3.10Traceback (most recent call last): File "/tmp/./venv/bin/uwsgi", line 5, in <module> from pyuwsgi import runModuleNotFoundError: No module named 'pyuwsgi'
I noticed that during the startup it prints this (suspicious) message:
detected binary path: /usr/bin/python3.10
despite my sys.executable being /tmp/venv/bin/python3
$ readlink -f venv/bin/python3/usr/bin/python3.10
therefore I can work around this by setting --binary-path:
$ venv/bin/uwsgi --py-autoreload 1 --http :9001 --wsgi-file app.py --binary-path "$PWD/venv/bin/python3"*** Starting uWSGI 2.0.20 (64bit) on [Wed Aug 31 09:38:27 2022] ***compiled with version: 8.3.1 20190311 (Red Hat 8.3.1-3) on 11 November 2021 18:14:15os: Linux-5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022nodename: asottile-sentrymachine: x86_64clock source: unixpcre jit disableddetected number of CPU cores: 5current working directory: /tmpdetected binary path: /tmp/venv/bin/python3your processes number limit is 31521your memory page size is 4096 bytesdetected max file descriptor number: 1024lock engine: pthread robust mutexesthunder lock: disabled (you can enable it with --thunder-lock)uWSGI http bound on :9001 fd 4uwsgi socket 0 bound to TCP address 127.0.0.1:44069 (port auto-assigned) fd 3Python version: 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]--- Python VM already initialized ---Python main interpreter initialized at 0x5570d1feb560python threads support enabledyour server socket listen backlog is limited to 100 connectionsyour mercy for graceful operations on workers is 60 secondsmapped 145808 bytes (142 KB) for 1 cores*** Operational MODE: single process ***WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x5570d1feb560 pid: 7164 (default app)*** uWSGI is running in multiple interpreter mode ***spawned uWSGI master process (pid: 7164)spawned uWSGI worker 1 (pid: 7165, cores: 1)spawned uWSGI http 1 (pid: 7166)Python auto-reloader enabled[uwsgi-python-reloader] module/file app.py has been modifiedgateway "uWSGI http 1" has been buried (pid: 7166)...gracefully killing workers...Gracefully killing worker 1 (pid: 7165)...worker 1 buried after 1 secondsbinary reloading uWSGI...chdir() to /tmpclosing all non-uwsgi socket fds > 2 (max_fd = 1024)...found fd 3 mapped to socket 0 (127.0.0.1:44069)running /tmp/venv/bin/python3*** Starting uWSGI 2.0.20 (64bit) on [Wed Aug 31 09:38:33 2022] ***compiled with version: 8.3.1 20190311 (Red Hat 8.3.1-3) on 11 November 2021 18:14:15os: Linux-5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022nodename: asottile-sentrymachine: x86_64clock source: unixpcre jit disableddetected number of CPU cores: 5current working directory: /tmpdetected binary path: /tmp/venv/bin/python3your processes number limit is 31521your memory page size is 4096 bytesdetected max file descriptor number: 1024lock engine: pthread robust mutexesthunder lock: disabled (you can enable it with --thunder-lock)uWSGI http bound on :9001 fd 5uwsgi socket 0 bound to TCP address 127.0.0.1:37001 (port auto-assigned) fd 4Python version: 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]--- Python VM already initialized ---Python main interpreter initialized at 0x5646b3431560python threads support enabledyour server socket listen backlog is limited to 100 connectionsyour mercy for graceful operations on workers is 60 secondsmapped 145808 bytes (142 KB) for 1 cores*** Operational MODE: single process ***WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x5646b3431560 pid: 7164 (default app)*** uWSGI is running in multiple interpreter mode ***gracefully (RE)spawned uWSGI master process (pid: 7164)spawned uWSGI worker 1 (pid: 7171, cores: 1)spawned uWSGI http 1 (pid: 7172)Python auto-reloader enabled
The text was updated successfully, but these errors were encountered:
here is a minimal reproduction:
once it is running, edit
app.py
changing the response to something else and uwsgi will crash:I noticed that during the startup it prints this (suspicious) message:
despite my
sys.executable
being/tmp/venv/bin/python3
therefore I can work around this by setting
--binary-path
:venv/bin/uwsgi --py-autoreload 1 --http :9001 --wsgi-file app.py --binary-path "$PWD/venv/bin/python3"
The text was updated successfully, but these errors were encountered: