Opened 8 years ago

Closed 8 years ago

#26492 closed Bug (fixed)

"./ migrate" causes "maximum recursion depth exceeded" error

Reported by: Berker Peksag Owned by: Berker Peksag
Component: Migrations Version: dev
Severity: Release blocker Keywords:
Cc: Berker Peksag, _@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


With the latest master (0247c9b08f8da4a2d93b9cede6c615011552b55a), I'm getting the following exception:


  File "/home/berker/projects/django/django/core/management/commands/", line 62, in _run_checks
    issues.extend(super(Command, self).check(**kwargs))
  File "/home/berker/projects/django/django/core/management/", line 385, in check
  File "/home/berker/projects/django/django/core/management/commands/", line 61, in _run_checks
    issues = run_checks(tags=[Tags.database])
  File "/home/berker/projects/django/django/core/checks/", line 81, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/home/berker/projects/django/django/core/checks/", line 9, in check_database_backends
    for conn in connections.all():
  File "/home/berker/projects/django/django/db/", line 226, in all
    return [self[alias] for alias in self]
RuntimeError: maximum recursion depth exceeded

I created a sample project to demonstrate the bug: You can see the full output of ./ migrate at

The project is simple. I only created a model:

I believe the cause of the issue is at If I replace line 62 with

issues.extend(super(Command, self)._run_checks(**kwargs))

it works as expected.

Change History (6)

comment:2 by Christopher Neugebauer, 8 years ago

Cc: _@… added

comment:3 by Tim Graham, 8 years ago

Has patch: set
Needs tests: set
Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

Also confirmed in #26490 (closed that as a duplicate).

comment:4 by Berker Peksag, 8 years ago

Needs tests: unset
Owner: changed from nobody to Berker Peksag
Status: newassigned

comment:5 by Claude Paroz, 8 years ago

Triage Stage: AcceptedReady for checkin

comment:6 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In 93deb16:

Fixed #26492 -- Fixed "maximum recursion depth exceeded" migrate error.

A regression introduced in 0d3c616fbb2f49fa7ff6809e5a6777275352b35b;
refs #26351.

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