Shutdown errors in dev
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- observability
Research direction
Start with scout_apm/core/init.py and scout_apm/core/agent/socket.py, then inspect scout_apm/core/threading.py around the calls shown in the traceback. Reproduce the shutdown during a server reload or django-admin command on Python 3.12; done means shutdown no longer emits the interpreter-shutdown stacktrace.
Written by the indexing model from the issue text.
Description
Python 3.12, scout_apm_python 3.1.0
Looks like there are instances where the Core Agent doesn't quite shut down gracefully. I've seen this happen during server reloads as well as django-admin commands (which is probably a different question altogether). This might not be a problem, exactly, but it spews stacktraces.
Exception ignored in atexit callback: <function shutdown at 0x104ed9bc0>
Traceback (most recent call last):
File "...lib/python3.12/site-packages/scout_apm/core/__init__.py", line 92, in shutdown
CoreAgentSocketThread.wait_until_drained(
File "...lib/python3.12/site-packages/scout_apm/core/agent/socket.py", line 62, in wait_until_drained
cls.ensure_started()
File "...lib/python3.12/site-packages/scout_apm/core/threading.py", line 23, in ensure_started
cls._instance.start()
File "...lib/python3.12/threading.py", line 992, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't create new thread at interpreter shutdown
- Dominant language
- Python
- Stars
- 77
- Forks
- 19
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 5
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from scoutapp/scout_apm_python
-
botwork
Difficulty 4/5 3-5 days Newbie friendliness 42/100
scoutapp/scout_apm_python#841 ·
-
botwork
Difficulty 4/5 3-5 days Newbie friendliness 45/100
scoutapp/scout_apm_python#837 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
scoutapp/scout_apm_python#815 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
scoutapp/scout_apm_python#791 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
scoutapp/scout_apm_python#789 ·
All issues in scoutapp/scout_apm_python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100