Python uwsgi:运行时错误:无法释放未获取的锁
我正在运行uwsgi(在docker容器中使用django),每个生成的worker都会出现以下错误:Python uwsgi:运行时错误:无法释放未获取的锁,python,django,uwsgi,worker,Python,Django,Uwsgi,Worker,我正在运行uwsgi(在docker容器中使用django),每个生成的worker都会出现以下错误: spawned uWSGI master process (pid: 1) web_1 | spawned uWSGI worker 1 (pid: 18, cores: 2) web_1 | Exception ignored in: <function _after_at_fork_child_reinit_locks at 0x7fd944954
spawned uWSGI master process (pid: 1)
web_1 | spawned uWSGI worker 1 (pid: 18, cores: 2)
web_1 | Exception ignored in: <function _after_at_fork_child_reinit_locks at 0x7fd944954ca0>
web_1 | Traceback (most recent call last):
web_1 | File "/usr/local/lib/python3.8/logging/__init__.py", line 260, in _after_at_fork_child_reinit_locks
web_1 | spawned uWSGI worker 2 (pid: 19, cores: 2)
web_1 | _releaseLock() # Acquired by os.register_at_fork(before=.
web_1 | File "/usr/local/lib/python3.8/logging/__init__.py", line 228, in _releaseLock
web_1 | _lock.release()
web_1 | RuntimeError: cannot release un-acquired lock
我怎样才能解决这个问题?我丢了一个包裹吗
我的Docker文件使用的是python:3.8-slim
,但在3.7-slim
Dockerfile添加的包:
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1
# Install git, process tools, lsb-release (common in install instructions for CLIs)
RUN apt-get install -y git procps lsb-release
# Required for psycopg2: https://github.com/psycopg/psycopg2/issues/699
RUN apt-get install -y --no-install-recommends libpq-dev
# Install any missing dependencies for enhanced language service
RUN apt-get install -y libicu[0-9][0-9]
# Install uwsgi
RUN apt-get install -y build-essential
RUN pip install uwsgi
尝试删除
py调用osafterfork
uwsgi配置选项
来源:.尝试删除
py-call-osafterfork
uwsgi-config选项
来源:
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1
# Install git, process tools, lsb-release (common in install instructions for CLIs)
RUN apt-get install -y git procps lsb-release
# Required for psycopg2: https://github.com/psycopg/psycopg2/issues/699
RUN apt-get install -y --no-install-recommends libpq-dev
# Install any missing dependencies for enhanced language service
RUN apt-get install -y libicu[0-9][0-9]
# Install uwsgi
RUN apt-get install -y build-essential
RUN pip install uwsgi