systemd で uWSGI サービスを有効にしましたが、起動時に実行に失敗し、ログに次のように表示されます。
Wed Nov 22 12:36:10 2017 - your processes number limit is 47903
Wed Nov 22 12:36:10 2017 - your memory page size is 4096 bytes
Wed Nov 22 12:36:10 2017 - detected max file descriptor number: 1024
Wed Nov 22 12:36:10 2017 - lock engine: pthread robust mutexes
Wed Nov 22 12:36:10 2017 - thunder lock: disabled (you can enable it with --thunder-lock)
Wed Nov 22 12:36:10 2017 - uwsgi socket 0 bound to UNIX address /run/uwsgi/app/myapp/socket fd 3
Wed Nov 22 12:36:10 2017 - Python version: 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
Wed Nov 22 12:36:10 2017 - Set PythonHome to /home/me/venv
ImportError: No module named site
ただし、実行するとsudo systemctl restart uwsgi
サービスは期待どおりに開始されます。
Wed Nov 22 13:31:07 2017 - setuid() to 1000
Wed Nov 22 13:31:07 2017 - your processes number limit is 47903
Wed Nov 22 13:31:07 2017 - your memory page size is 4096 bytes
Wed Nov 22 13:31:07 2017 - detected max file descriptor number: 1024
Wed Nov 22 13:31:07 2017 - lock engine: pthread robust mutexes
Wed Nov 22 13:31:07 2017 - thunder lock: disabled (you can enable it with --thunder-lock)
Wed Nov 22 13:31:07 2017 - uwsgi socket 0 bound to UNIX address /run/uwsgi/app/myapp/socket fd 3
Wed Nov 22 13:31:07 2017 - Python version: 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]
Wed Nov 22 13:31:07 2017 - Set PythonHome to /home/me/venv
Wed Nov 22 13:31:07 2017 - *** Python threads support is disabled. You can enable it with --enable-threads ***
Wed Nov 22 13:31:07 2017 - Python main interpreter initialized at 0xec83c0
Wed Nov 22 13:31:07 2017 - your server socket listen backlog is limited to 100 connections
Wed Nov 22 13:31:07 2017 - your mercy for graceful operations on workers is 60 seconds
Wed Nov 22 13:31:07 2017 - mapped 218304 bytes (213 KB) for 2 cores
Wed Nov 22 13:31:07 2017 - *** Operational MODE: preforking ***
Wed Nov 22 13:31:09 2017 - WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0xec83c0 pid: 2744 (default app)
Wed Nov 22 13:31:09 2017 - *** uWSGI is running in multiple interpreter mode ***
Wed Nov 22 13:31:09 2017 - spawned uWSGI master process (pid: 2744)
Wed Nov 22 13:31:09 2017 - spawned uWSGI worker 1 (pid: 2760, cores: 1)
Wed Nov 22 13:31:09 2017 - spawned uWSGI worker 2 (pid: 2761, cores: 1)
何が問題なのでしょうか?