質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.35%
Google Cloud Platform

Google Cloud Platformは、Google社がクラウド上で提供しているサービス郡の総称です。エンドユーザー向けサービスと同様のインフラストラクチャーで運営されており、Webサイト開発から複雑なアプリ開発まで対応可能です。

uWSGI

uWSGIは、PythonでWebサービスを動かすアプリケーションサーバの一つです。WSGI(Web Server Gateway Interface)アプリケーションコンテナの一種で、WSGIに則ったDjangoやFlaskなどで動かすことができます。

Flask

FlaskはPython用のマイクロフレームワークであり、Werkzeug・Jinja 2・good intentionsをベースにしています。

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Q&A

0回答

3434閲覧

uwsgiのパラメータチューニング

sequelanonymous

総合スコア123

Google Cloud Platform

Google Cloud Platformは、Google社がクラウド上で提供しているサービス郡の総称です。エンドユーザー向けサービスと同様のインフラストラクチャーで運営されており、Webサイト開発から複雑なアプリ開発まで対応可能です。

uWSGI

uWSGIは、PythonでWebサービスを動かすアプリケーションサーバの一つです。WSGI(Web Server Gateway Interface)アプリケーションコンテナの一種で、WSGIに則ったDjangoやFlaskなどで動かすことができます。

Flask

FlaskはPython用のマイクロフレームワークであり、Werkzeug・Jinja 2・good intentionsをベースにしています。

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

0グッド

0クリップ

投稿2021/04/07 10:41

nginx+uwsgi+flaskのよくあるアプリケーションをGKEで動かしています。
そこでlatencyを下げるためにuwsgiのパラメータ・チューニングをしています。
しかし、logにある通りのエラーが発生します。
なんかいもデプロイをし直したりはして実際にデプロイされたコンテナ内にはいって確認していますが同じエラーのままです。

どうにも検討がつかないので、どなたか同じような事象にあったことがあるかたは、なにかきづいた点などご指摘頂けますでしょうか?

エントリーポイント

CMD ["uwsgi", "--emperor", "/code/python/uwsgi.ini"]

uwsgi.ini

[uwsgi] chdir = /code/python wsgi-file = wsgi.py callable = app master = true processes = 1 socket = :3031 uid=1000 gid=1000 chmod-socket = 666 logto = /code/python/uwsgi.log pidfile = /code/python/uwsgi.pid vacuum = true die-on-term = true thunder-lock = true max-requests = 6000 max-requests-delta = 300 stats = /var/run/uWSGI/projectname.stats.sock memory-report = true
$ cat uwsgi.log *** Starting uWSGI 2.0.19.1 (64bit) on [Wed Apr 7 10:22:39 2021] *** compiled with version: 8.3.0 on 07 April 2021 09:19:30 os: Linux-4.19.112+ #1 SMP Sat Oct 10 13:45:37 PDT 2020 nodename: app-node-6ccdf4b4c9-sn8df machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 1 current working directory: /code writing pidfile to /code/python/uwsgi.pid detected binary path: /usr/local/bin/uwsgi chdir() to /code/python your memory page size is 4096 bytes detected max file descriptor number: 1048576 lock engine: pthread robust mutexes thunder lock: enabled uwsgi socket 0 bound to TCP address :3031 fd 3 Python version: 3.7.10 (default, Mar 12 2021, 20:10:57) [GCC 8.3.0] *** Python threads support is disabled. You can enable it with --enable-threads *** Python main interpreter initialized at 0x563bf6a90a60 your server socket listen backlog is limited to 100 connections your mercy for graceful operations on workers is 60 seconds mapped 145840 bytes (142 KB) for 1 cores *** Operational MODE: single process *** INFO:googlecloudprofiler:Google Cloud Profiler Python agent version: 3.0.3 WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x563bf6a90a60 pid: 6 (default app) *** uWSGI is running in multiple interpreter mode *** spawned uWSGI master process (pid: 6) DEBUG:googlecloudprofiler.client:Profiler has started spawned uWSGI worker 1 (pid: 11, cores: 1) bind(): No such file or directory [core/socket.c line 230] ...brutally killing workers... unlink(): No such file or directory [core/uwsgi.c line 1675] Wed Apr 7 10:22:42 2021 - uWSGI worker 1 screams: UAAAAAAH my master disconnected: i will kill myself !!! *** Starting uWSGI 2.0.19.1 (64bit) on [Wed Apr 7 10:22:45 2021] *** compiled with version: 8.3.0 on 07 April 2021 09:19:30 os: Linux-4.19.112+ #1 SMP Sat Oct 10 13:45:37 PDT 2020 nodename: app-node-6ccdf4b4c9-sn8df machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 1 current working directory: /code writing pidfile to /code/python/uwsgi.pid detected binary path: /usr/local/bin/uwsgi chdir() to /code/python your memory page size is 4096 bytes detected max file descriptor number: 1048576 lock engine: pthread robust mutexes thunder lock: enabled probably another instance of uWSGI is running on the same address (:3031). bind(): Address already in use [core/socket.c line 769] unlink(): No such file or directory [core/uwsgi.c line 1675] *** Starting uWSGI 2.0.19.1 (64bit) on [Wed Apr 7 10:22:52 2021] *** compiled with version: 8.3.0 on 07 April 2021 09:19:30 os: Linux-4.19.112+ #1 SMP Sat Oct 10 13:45:37 PDT 2020 nodename: app-node-6ccdf4b4c9-sn8df machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 1 current working directory: /code writing pidfile to /code/python/uwsgi.pid detected binary path: /usr/local/bin/uwsgi chdir() to /code/python your memory page size is 4096 bytes detected max file descriptor number: 1048576 lock engine: pthread robust mutexes thunder lock: enabled probably another instance of uWSGI is running on the same address (:3031). bind(): Address already in use [core/socket.c line 769] unlink(): No such file or directory [core/uwsgi.c line 1675] *** Starting uWSGI 2.0.19.1 (64bit) on [Wed Apr 7 10:22:59 2021] *** compiled with version: 8.3.0 on 07 April 2021 09:19:30 os: Linux-4.19.112+ #1 SMP Sat Oct 10 13:45:37 PDT 2020 nodename: app-node-6ccdf4b4c9-sn8df machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 1 current working directory: /code writing pidfile to /code/python/uwsgi.pid detected binary path: /usr/local/bin/uwsgi chdir() to /code/python your memory page size is 4096 bytes detected max file descriptor number: 1048576 lock engine: pthread robust mutexes thunder lock: enabled probably another instance of uWSGI is running on the same address (:3031). bind(): Address already in use [core/socket.c line 769] unlink(): No such file or directory [core/uwsgi.c line 1675] *** Starting uWSGI 2.0.19.1 (64bit) on [Wed Apr 7 10:23:08 2021] *** compiled with version: 8.3.0 on 07 April 2021 09:19:30 os: Linux-4.19.112+ #1 SMP Sat Oct 10 13:45:37 PDT 2020 nodename: app-node-6ccdf4b4c9-sn8df machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 1 current working directory: /code writing pidfile to /code/python/uwsgi.pid detected binary path: /usr/local/bin/uwsgi chdir() to /code/python your memory page size is 4096 bytes detected max file descriptor number: 1048576 lock engine: pthread robust mutexes thunder lock: enabled probably another instance of uWSGI is running on the same address (:3031). bind(): Address already in use [core/socket.c line 769] unlink(): No such file or directory [core/uwsgi.c line 1675] *** Starting uWSGI 2.0.19.1 (64bit) on [Wed Apr 7 10:23:18 2021] *** compiled with version: 8.3.0 on 07 April 2021 09:19:30 os: Linux-4.19.112+ #1 SMP Sat Oct 10 13:45:37 PDT 2020 nodename: app-node-6ccdf4b4c9-sn8df machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 1 current working directory: /code writing pidfile to /code/python/uwsgi.pid detected binary path: /usr/local/bin/uwsgi chdir() to /code/python your memory page size is 4096 bytes detected max file descriptor number: 1048576 lock engine: pthread robust mutexes thunder lock: enabled probably another instance of uWSGI is running on the same address (:3031). bind(): Address already in use [core/socket.c line 769] unlink(): No such file or directory [core/uwsgi.c line 1675] *** Starting uWSGI 2.0.19.1 (64bit) on [Wed Apr 7 10:23:28 2021] *** compiled with version: 8.3.0 on 07 April 2021 09:19:30 os: Linux-4.19.112+ #1 SMP Sat Oct 10 13:45:37 PDT 2020 nodename: app-node-6ccdf4b4c9-sn8df machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 1 current working directory: /code writing pidfile to /code/python/uwsgi.pid detected binary path: /usr/local/bin/uwsgi chdir() to /code/python your memory page size is 4096 bytes detected max file descriptor number: 1048576 lock engine: pthread robust mutexes thunder lock: enabled probably another instance of uWSGI is running on the same address (:3031). bind(): Address already in use [core/socket.c line 769] unlink(): No such file or directory [core/uwsgi.c line 1675] *** Starting uWSGI 2.0.19.1 (64bit) on [Wed Apr 7 10:23:38 2021] *** compiled with version: 8.3.0 on 07 April 2021 09:19:30 os: Linux-4.19.112+ #1 SMP Sat Oct 10 13:45:37 PDT 2020 nodename: app-node-6ccdf4b4c9-sn8df machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 1 current working directory: /code writing pidfile to /code/python/uwsgi.pid detected binary path: /usr/local/bin/uwsgi chdir() to /code/python your memory page size is 4096 bytes detected max file descriptor number: 1048576 lock engine: pthread robust mutexes thunder lock: enabled probably another instance of uWSGI is running on the same address (:3031). bind(): Address already in use [core/socket.c line 769] unlink(): No such file or directory [core/uwsgi.c line 1675] *** Starting uWSGI 2.0.19.1 (64bit) on [Wed Apr 7 10:23:50 2021] *** compiled with version: 8.3.0 on 07 April 2021 09:19:30 os: Linux-4.19.112+ #1 SMP Sat Oct 10 13:45:37 PDT 2020 nodename: app-node-6ccdf4b4c9-sn8df machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 1 current working directory: /code writing pidfile to /code/python/uwsgi.pid detected binary path: /usr/local/bin/uwsgi chdir() to /code/python your memory page size is 4096 bytes detected max file descriptor number: 1048576 lock engine: pthread robust mutexes thunder lock: enabled probably another instance of uWSGI is running on the same address (:3031). bind(): Address already in use [core/socket.c line 769] unlink(): No such file or directory [core/uwsgi.c line 1675] *** Starting uWSGI 2.0.19.1 (64bit) on [Wed Apr 7 10:24:04 2021] *** compiled with version: 8.3.0 on 07 April 2021 09:19:30 os: Linux-4.19.112+ #1 SMP Sat Oct 10 13:45:37 PDT 2020 nodename: app-node-6ccdf4b4c9-sn8df machine: x86_64 clock source: unix pcre jit disabled detected number of CPU cores: 1 current working directory: /code writing pidfile to /code/python/uwsgi.pid detected binary path: /usr/local/bin/uwsgi chdir() to /code/python your memory page size is 4096 bytes detected max file descriptor number: 1048576 lock engine: pthread robust mutexes thunder lock: enabled probably another instance of uWSGI is running on the same address (:3031). bind(): Address already in use [core/socket.c line 769] unlink(): No such file or directory [core/uwsgi.c line 1675]

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.35%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問