Opened 4 years ago

Closed 4 years ago

#32064 closed Bug (invalid)

runserver sometimes hangs on Windows 10 with PostgreSQL.

Reported by: Steve Caballero Owned by: nobody
Component: Core (Management commands) Version: 3.0
Severity: Normal Keywords: runserver
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When starting the development server with the runserver command I sometimes have to wait up to a minute or so for the server to finish 'performing system checks'.
Using pycharm's profiler I can see that winapi.WaitForSingleObject is taking in the order 70,000 ms!! Usually it executes in ~1000ms
I'd say this is happening maybe 1 in 10 to 1 in 5 times I start the development server.
I'd happily provide more information but I'm not sure what more I can say at this stage.

Change History (1)

comment:1 by Mariusz Felisiak, 4 years ago

Resolution: invalid
Status: newclosed
Summary: Using windows 10 and postgres, executing 'runserver' sometimes takes a long time to start up. Debugger suggests the problem is winapi.WaitForSingleObject is timing outrunserver sometimes hangs on Windows 10 with PostgreSQL.

winapi.WaitForSingleObject is not called directly by Django, it's called by Python in the subprocess module. However, I don't think it's a bug in Python, the main question is why and which process hangs. It's non-deterministic issue so it's probably related with a local state and have nothing to do with Django.

Closing as invalid, unless you can prove that it's Django's fault that a process hangs.

Note: See TracTickets for help on using tickets.
Back to Top