Skip to content

KeyError 'some_field_for_form_a' is not found in FormB during concurrent requests #42

Description

@JacoBezuidenhout

Hello everyone. I am posting this because I am out of ideas. I have tried to find the cause of this issue for the last 2 years.

Say I have 4 model admins:

TabbedAdminMixin, ModelAdmin
a: BasketAdmin
b: ConsumerAdmin

Normal Django ModelAdmin
c: RoleAdmin
d: BranchAdmin

It took me veeeery long to be able to find a way to re-create this error but as of yesterday, I can easily re-create it by using locust to simulate concurrent requests.

When I run locust with 5 concurrent users, each doing requests to /basket//change/ and /consumer//change/ I get a keyerror where render_tab_fieldsets_inlines want to create a, for example, BasketAdmin with fields from ConsumerAdmin's form and vice versa.

When I run the same locust file on /role//change/ and /branch//change/ (vanilla django modeladmins) I don't get keyerrors. This happend locally with runserver and in production with uwsgi.

Any help will be very much appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions