Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import os


def worker_int(worker):
# SIGINT (Ctrl+C) default path raises SystemExit inside the worker's recv()
# loop, dumping a traceback through gunicorn's HTTP parser frames. os._exit
# short-circuits the unwind for a clean foreground stop. SIGTERM (graceful)
# is unaffected — it goes through a different code path.
os._exit(0)
Comment thread
paolosalvatori marked this conversation as resolved.


def worker_abort(worker):
# SIGABRT is what the arbiter sends when a worker misses its heartbeat
# ([CRITICAL] WORKER TIMEOUT). The default handler does sys.exit(1), which
# unwinds through the same recv() stack as SIGINT and prints a misleading
# traceback. The WORKER TIMEOUT log line above it is the real diagnostic;
# exit at the C level to suppress the spurious trace.
os._exit(1)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Flask==3.1.3
azure-identity==1.25.1
pymongo==4.15.3
gunicorn==23.0.0
python-dotenv==1.2.2
azure-identity==1.25.3
pymongo==4.17.0
gunicorn==26.0.0
python-dotenv==1.2.2
18 changes: 18 additions & 0 deletions samples/web-app-cosmosdb-nosql-api/python/src/gunicorn.conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import os


def worker_int(worker):
# SIGINT (Ctrl+C) default path raises SystemExit inside the worker's recv()
# loop, dumping a traceback through gunicorn's HTTP parser frames. os._exit
# short-circuits the unwind for a clean foreground stop. SIGTERM (graceful)
# is unaffected — it goes through a different code path.
os._exit(0)
Comment thread
paolosalvatori marked this conversation as resolved.


def worker_abort(worker):
# SIGABRT is what the arbiter sends when a worker misses its heartbeat
# ([CRITICAL] WORKER TIMEOUT). The default handler does sys.exit(1), which
# unwinds through the same recv() stack as SIGINT and prints a misleading
# traceback. The WORKER TIMEOUT log line above it is the real diagnostic;
# exit at the C level to suppress the spurious trace.
os._exit(1)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Flask==3.1.3
azure-mgmt-cosmosdb==9.8.0
azure-cosmos==4.7.0
gunicorn==22.0.0
azure-mgmt-cosmosdb==9.9.0
azure-cosmos==4.15.0
gunicorn==26.0.0
python-dotenv==1.2.2
setuptools==79.0.1
setuptools==82.0.1
18 changes: 18 additions & 0 deletions samples/web-app-managed-identity/python/src/gunicorn.conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import os


def worker_int(worker):
# SIGINT (Ctrl+C) default path raises SystemExit inside the worker's recv()
# loop, dumping a traceback through gunicorn's HTTP parser frames. os._exit
# short-circuits the unwind for a clean foreground stop. SIGTERM (graceful)
# is unaffected — it goes through a different code path.
os._exit(0)
Comment thread
paolosalvatori marked this conversation as resolved.


def worker_abort(worker):
# SIGABRT is what the arbiter sends when a worker misses its heartbeat
# ([CRITICAL] WORKER TIMEOUT). The default handler does sys.exit(1), which
# unwinds through the same recv() stack as SIGINT and prints a misleading
# traceback. The WORKER TIMEOUT log line above it is the real diagnostic;
# exit at the C level to suppress the spurious trace.
os._exit(1)
10 changes: 5 additions & 5 deletions samples/web-app-managed-identity/python/src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Flask==3.1.3
azure-identity==1.16.1
azure-storage-blob==12.26.0
azure-core==1.38.0
gunicorn==23.0.0
python-dotenv==1.2.2
azure-identity==1.25.3
azure-storage-blob==12.29.0
azure-core==1.41.0
gunicorn==26.0.0
python-dotenv==1.2.2
18 changes: 18 additions & 0 deletions samples/web-app-sql-database/python/src/gunicorn.conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import os


def worker_int(worker):
# SIGINT (Ctrl+C) default path raises SystemExit inside the worker's recv()
# loop, dumping a traceback through gunicorn's HTTP parser frames. os._exit
# short-circuits the unwind for a clean foreground stop. SIGTERM (graceful)
# is unaffected — it goes through a different code path.
os._exit(0)
Comment thread
paolosalvatori marked this conversation as resolved.


def worker_abort(worker):
# SIGABRT is what the arbiter sends when a worker misses its heartbeat
# ([CRITICAL] WORKER TIMEOUT). The default handler does sys.exit(1), which
# unwinds through the same recv() stack as SIGINT and prints a misleading
# traceback. The WORKER TIMEOUT log line above it is the real diagnostic;
# exit at the C level to suppress the spurious trace.
os._exit(1)
8 changes: 4 additions & 4 deletions samples/web-app-sql-database/python/src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Flask==3.1.3
azure-identity==1.25.3
pyodbc==5.3.0
gunicorn==25.3.0
gunicorn==26.0.0
python-dotenv==1.2.2
azure-keyvault-secrets==4.10.0
azure-keyvault-certificates==4.10.0
cryptography==46.0.7
azure-keyvault-secrets==4.11.0
azure-keyvault-certificates==4.11.1
cryptography==48.0.0
Loading