Skip to content

[Python 3.12] ValueError: Another profiling tool is already active #682

@Elendiar

Description

@Elendiar

In python 3.12 sometimes this exception raises, usually immediately after the server starts in the first request.
SILKY_PYTHON_PROFILER = False seems to fix it.

File "/backend/python/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
  response = get_response(request)

File "/backend/python/lib/python3.12/site-packages/silk/middleware.py", line 70, in __call__
  self.process_request(request)

File "/backend/python/lib/python3.12/site-packages/silk/middleware.py", line 121, in process_request
  DataCollector().configure(request_model, should_profile=should_profile)

File "/backend/python/lib/python3.12/site-packages/silk/collector.py", line 95, in configure
  self.local.pythonprofiler.enable()
ValueError: Another profiling tool is already active

python/cpython#110770 (comment)

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