Skip to content

gunicorn multiple worker/threads - Lock and ExtensionsCreation testen #82

Description

@blackdotraven

Starting OMM-Sync with multiple workers/threads (-w 16 --threads 16) creates 16 OMM connections.
The "problem" is the config setup before we return the app-object of flask to gunicorn

client = mitel_ommclient2.OMMClient2(

We have now 16 backendconnections to the omm.
Not testest untill now:

  • how many schedullers run at a time
  • is there state/variables shared between multiple threads/processes/workers
  • are there locks shared between multiple threads/processes/workers

Shell

gunicorn -w 16 --threads 16 dect-wip-ommsync:init_wsgi\(\)
Using config: /etc/dect-wip.ini
[2026-07-01 23:31:39 +0200] [235482] [INFO] Starting gunicorn 26.0.0
[2026-07-01 23:31:39 +0200] [235482] [INFO] Listening at: http://10.10.10.1:8081 (235482)
[2026-07-01 23:31:39 +0200] [235482] [INFO] Using worker: gthread
[2026-07-01 23:31:39 +0200] [235483] [INFO] Booting worker with pid: 235483
[2026-07-01 23:31:39 +0200] [235484] [INFO] Booting worker with pid: 235484
[2026-07-01 23:31:39 +0200] [235485] [INFO] Booting worker with pid: 235485
[2026-07-01 23:31:39 +0200] [235486] [INFO] Booting worker with pid: 235486
[2026-07-01 23:31:39 +0200] [235487] [INFO] Booting worker with pid: 235487
[2026-07-01 23:31:39 +0200] [235488] [INFO] Booting worker with pid: 235488
[2026-07-01 23:31:39 +0200] [235489] [INFO] Booting worker with pid: 235489
[2026-07-01 23:31:39 +0200] [235490] [INFO] Booting worker with pid: 235490
[2026-07-01 23:31:39 +0200] [235491] [INFO] Booting worker with pid: 235491
[2026-07-01 23:31:39 +0200] [235492] [INFO] Booting worker with pid: 235492
[2026-07-01 23:31:39 +0200] [235493] [INFO] Booting worker with pid: 235493
[2026-07-01 23:31:40 +0200] [235494] [INFO] Booting worker with pid: 235494
[2026-07-01 23:31:40 +0200] [235495] [INFO] Booting worker with pid: 235495
[2026-07-01 23:31:40 +0200] [235496] [INFO] Booting worker with pid: 235496
[2026-07-01 23:31:40 +0200] [235497] [INFO] Booting worker with pid: 235497
[2026-07-01 23:31:40 +0200] [235498] [INFO] Booting worker with pid: 235498
Using config: /etc/dect-wip.ini
[2026-07-01 23:31:40 +0200] [235482] [INFO] Control socket listening at /run/user/0/gunicorn.ctl
Using config: /etc/dect-wip.ini
Using config: /etc/dect-wip.ini
Using config: /etc/dect-wip.ini
Using config: /etc/dect-wip.ini
Using config: /etc/dect-wip.ini
Using config: /etc/dect-wip.ini
Using config: /etc/dect-wip.ini
Using config: /etc/dect-wip.ini
Using config: /etc/dect-wip.ini
Using config: /etc/dect-wip.ini
Using config: /etc/dect-wip.ini
Using config: /etc/dect-wip.ini
Using config: /etc/dect-wip.ini
Using config: /etc/dect-wip.ini
Using config: /etc/dect-wip.ini

OMM system->eventlog

3	1	?	AXI : [222*/admin] Open for user/device synchronization client detected (10.10.10.1:33294)
3	1	?	AXI : [221*/admin] Open for user/device synchronization client detected (10.10.10.1:33288)
3	1	?	AXI : [220*/admin] Open for user/device synchronization client detected (10.10.10.1:33286)
2	1	?	AXI : [222] New secure connection from 10.10.10.1:33294
3	1	?	AXI : [219*/admin] Open for user/device synchronization client detected (10.10.10.1:33272)
2	1	?	AXI : [221] New secure connection from 10.10.10.1:33288
3	1	?	AXI : [218*/admin] Open for user/device synchronization client detected (10.10.10.1:33264)
2	1	?	AXI : [220] New secure connection from 10.10.10.1:33286
3	1	?	AXI : [217*/admin] Open for user/device synchronization client detected (10.10.10.1:33248)
2	1	?	AXI : [219] New secure connection from 10.10.10.1:33272
3	1	?	AXI : [216*/admin] Open for user/device synchronization client detected (10.10.10.1:33238)
2	1	?	AXI : [218] New secure connection from 10.10.10.1:33264
3	1	?	AXI : [215*/admin] Open for user/device synchronization client detected (10.10.10.1:33226)
2	1	?	AXI : [217] New secure connection from 10.10.10.1:33248
3	1	?	AXI : [214*/admin] Open for user/device synchronization client detected (10.10.10.1:33218)
2	1	?	AXI : [216] New secure connection from 10.10.10.1:33238
3	1	?	AXI : [213*/admin] Open for user/device synchronization client detected (10.10.10.1:33204)
2	1	?	AXI : [215] New secure connection from 10.10.10.1:33226
3	1	?	AXI : [212*/admin] Open for user/device synchronization client detected (10.10.10.1:33194)
2	1	?	AXI : [214] New secure connection from 10.10.10.1:33218
3	1	?	AXI : [209*/admin] Open for user/device synchronization client detected (10.10.10.1:33174)
3	1	?	AXI : [211*/admin] Open for user/device synchronization client detected (10.10.10.1:33186)
2	1	?	AXI : [213] New secure connection from 10.10.10.1:33204
3	1	?	AXI : [208*/admin] Open for user/device synchronization client detected (10.10.10.1:33160)
3	1	?	AXI : [210*/admin] Open for user/device synchronization client detected (10.10.10.1:33178)
2	1	?	AXI : [212] New secure connection from 10.10.10.1:33194
3	1	?	AXI : [207*/admin] Open for user/device synchronization client detected (10.10.10.1:33154)
2	1	?	AXI : [211] New secure connection from 10.10.10.1:33186
2	1	?	AXI : [210] New secure connection from 10.10.10.1:33178
2	1	?	AXI : [209] New secure connection from 10.10.10.1:33174
2	1	?	AXI : [208] New secure connection from 10.10.10.1:33160
2	1	?	AXI : [207] New secure connection from 10.10.10.1:33154

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions