﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
37035	Django stops serving requests after killing a task that took too long to shut down	inputvalidation		"I'm running a Django app with daphne like this:

daphne -e ssl:${PORT}:interface=${ADDRESS}:privateKey=${KEY}:certKey=${CERT} app.asgi:application

My app serves an endpoint which in turns calls an API, and that API is not responding. daphne then warns with:

2026-04-15 07:26:58,035 WARNING Application instance <Task pending name='Task-4092' coro=<ASGIHandler.call() running at /opt/app/.env/lib64/python3.12/site-packages/django/core/handlers/asgi.py:161> wait_for=<Future pending cb=[shield.._outer_done_callback() at /usr/lib64/python3.12/asyncio/tasks.py:922, Task.task_wakeup()]>> for connection <WebRequest at 0x7f4f2b133720 method=GET uri=/slow-endpoint clientproto=HTTP/1.1> took too long to shut down and was killed.

... but also stops serving any subsequent requests. I have to kill the process - it hangs (unable to stop it with CTRL-C in terminal) and start again. Is this a known issue or have I configured something incorrectly?

Reported this to the daphne project but then realized something appears to be stuck in Django code.

Django version is 5.2.12, daphne version is 4.2.1, Twisted is at 25.5.0."	Bug	closed	HTTP handling	5.2	Normal	invalid	asgi		Unreviewed	0	0	0	0	0	0
