0

我的应用程序在 Azure Webapps for Containers (linux) 上的 docker 容器中运行。我发现我的服务器在监听队列增加时出错。

日志:

uWSGI listen queue of socket "127.0.0.1:37400" (fd: 3) full !!! **(101/100)**

我添加了 '''--listen 4096''' 选项来增加队列。但我的服务器仍然抛出错误。日志:

uWSGI listen queue of socket "127.0.0.1:37400" (fd: 3) full !!! **(129/128)**

一些参考资料说需要增加net.core.somaxconn,但我无法增加。日志:

sysctl: error: 'net.core.somaxconn' is an unknown key

知道我缺少什么吗?谢谢

编辑

让我分享我的 Dockerfile

FROM python:3.6-alpine

RUN apk update && \
    apk add python3 python3-dev \
            gcc musl-dev linux-headers zlib zlib-dev libffi libffi-dev\
            freetype freetype-dev jpeg jpeg-dev \
            postgresql-dev

WORKDIR /code
COPY . /code/

ENV LANG c.UTF-8
ENV DJANGO_SETTINGS_MODULE myproject.settings.prod
ENV PYTHONUNBUFFERED 1

RUN pip3 install -r requirements.txt

EXPOSE 80

CMD ["uwsgi", "--plugins", "http,python", \
              "--http", "0.0.0.0:80", \
              "--wsgi-file", "/code/myproject/wsgi.py", \
              "--master", \
              "--listen", "4096", \
              "--die-on-term", \
              "--single-interpreter", \
              "--harakiri", "30", \
              "--reload-on-rss", "512", \
              "--post-buffering-bufsize", "8192"]
4

0 回答 0