Closed
Description
Hi,
I've noticed since moving from threaded to multiprocess nginx-unit with python 3.9 I frequently get a loop of Waiting for control socket to be removed
after the container starts up.
The nginx-unit config:
{
"listeners": {
"*:8099": {
"pass": "applications/fastapi"
}
},
"access_log": "/dev/stdout",
"applications": {
"fastapi": {
"processes": 4,
"limits": {
"requests": 200
},
"type": "python 3.9",
"path": "/app",
"module": "main",
"home": "/usr/local",
"callable": "app",
"protocol": "asgi",
}
}
}
Logs from the container:
prod_web_1 | /usr/local/bin/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, launching Unit daemon to perform initial configuration...
prod_web_1 | 2021/11/30 11:07:58 [info] 14#14 unit started
prod_web_1 | 2021/11/30 11:07:58 [info] 17#17 discovery started
Notice: d_web_1 | 2021/11/30 11:07:58 [notice] 17#17 module: python 3.9.9 "/usr/lib/unit/modules/python3.unit.so"
prod_web_1 | 2021/11/30 11:07:58 [info] 15#15 controller started
prod_web_1 | 2021/11/30 11:07:58 [info] 19#19 router started
Notice: d_web_1 | 2021/11/30 11:07:58 [notice] 15#15 process 17 exited with code 0
prod_web_1 | 2021/11/30 11:07:58 [info] 19#19 OpenSSL 1.1.1k 25 Mar 2021, 101010bf
prod_web_1 | {
prod_web_1 | "certificates": {},
prod_web_1 | "config": {
prod_web_1 | "listeners": {},
prod_web_1 | "applications": {}
prod_web_1 | }
prod_web_1 | }
prod_web_1 | /usr/local/bin/docker-entrypoint.sh: Looking for certificate bundles in /docker-entrypoint.d/...
prod_web_1 | /usr/local/bin/docker-entrypoint.sh: Looking for configuration snippets in /docker-entrypoint.d/...
prod_web_1 | /usr/local/bin/docker-entrypoint.sh: Applying configuration /docker-entrypoint.d/config.json
prod_web_1 | 2021/11/30 11:07:58 [info] 23#23 "fastapi" prototype started
prod_web_1 | 2021/11/30 11:07:58 [info] 24#24 "fastapi" application started
prod_web_1 | 2021/11/30 11:07:59 [info] 29#29 "fastapi" application started
prod_web_1 | 2021/11/30 11:08:00 [info] 34#34 "fastapi" application started
prod_web_1 | 2021/11/30 11:08:00 [info] 39#39 "fastapi" application started
prod_web_1 | /usr/local/bin/docker-entrypoint.sh: OK: HTTP response status code is '200'
prod_web_1 | {
prod_web_1 | "success": "Reconfiguration done."
prod_web_1 | }
prod_web_1 |
prod_web_1 | /usr/local/bin/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/...
prod_web_1 | /usr/local/bin/docker-entrypoint.sh: Stopping Unit daemon after initial configuration...
prod_web_1 | /usr/local/bin/docker-entrypoint.sh: Waiting for control socket to be removed...
Notice: d_web_1 | 2021/11/30 11:08:01 [notice] 15#15 process 18 exited with code 0
prod_web_1 | /usr/local/bin/docker-entrypoint.sh: Waiting for control socket to be removed...
Notice: d_web_1 | 2021/11/30 11:08:01 [notice] 23#23 app process (isolated 34) exited with code 0
prod_web_1 | 2021/11/30 11:08:01 [alert] 23#23 sendmsg(13, -1, -1, 2) failed (32: Broken pipe)
Notice: d_web_1 | 2021/11/30 11:08:01 [notice] 23#23 app process (isolated 24) exited with code 0
prod_web_1 | 2021/11/30 11:08:01 [alert] 23#23 sendmsg(13, -1, -1, 2) failed (32: Broken pipe)
prod_web_1 | /usr/local/bin/docker-entrypoint.sh: Waiting for control socket to be removed...
Notice: d_web_1 | 2021/11/30 11:08:01 [notice] 23#23 app process (isolated 29) exited with code 0
prod_web_1 | 2021/11/30 11:08:01 [alert] 23#23 sendmsg(13, -1, -1, 2) failed (32: Broken pipe)
Notice: d_web_1 | 2021/11/30 11:08:01 [notice] 23#23 app process (isolated 39) exited with code 0
prod_web_1 | 2021/11/30 11:08:01 [alert] 23#23 sendmsg(13, -1, -1, 2) failed (32: Broken pipe)
Notice: d_web_1 | 2021/11/30 11:08:01 [notice] 15#15 process 19 exited with code 0
prod_web_1 | /usr/local/bin/docker-entrypoint.sh: Waiting for control socket to be removed...
prod_web_1 | /usr/local/bin/docker-entrypoint.sh: Waiting for control socket to be removed...