Bug #14924
closedtaxonomies/edit.html.erb takes minutes to render
Description
Trying to open the edit page of either a location or organization takes multiple minutes.
The time is spent rendering taxonomies/edit.html.erb and the passenger process stays ~100% utilization throughout the request.
Log attached is from rails environment set to `development`, notice that it takes over 6 minutes to complete the request.
Files
Updated by Dominic Cleal over 8 years ago
- Related to Bug #10893: Editing organizations/locations hangs in 1.8.2 added
Updated by Dominic Cleal over 8 years ago
Could be the same as #10893 and related issues, but enabling SQL logging may show for sure (http://theforeman.org/manuals/1.11/index.html#7.2Debugging).
Updated by Taylan Develioglu over 8 years ago
Attached logfile with SQL logging enabled.
It shows a huge amount of this repeating:
2016-05-04 12:01:04 [sql] [D] CACHE (0.0ms) SELECT "templates".* FROM "templates" INNER JOIN "operatingsystems_provisioning_templates" ON "operatingsystems_provisioning_templates"."provisioning_template_id" = "templates"."id" INNER JOIN "operatingsystems" ON "operatingsystems"."id" = "operatingsystems_provisioning_templates"."operatingsystem_id" INNER JOIN "template_kinds" ON "template_kinds"."id" = "templates"."template_kind_id" INNER JOIN "template_combinations" ON "template_combinations"."provisioning_template_id" = "templates"."id" WHERE "templates"."type" IN ('ProvisioningTemplate') AND "operatingsystems"."id" = 1 AND "template_kinds"."name" = 'provision' AND "template_combinations"."hostgroup_id" IS NULL AND "template_combinations"."environment_id" = 1 ORDER BY templates.name LIMIT 1
Updated by Tomer Brisker over 8 years ago
- Status changed from New to Assigned
- Assignee set to Tomer Brisker
Updated by The Foreman Bot over 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3491 added
Updated by Taylan Develioglu over 8 years ago
- File pull_3491_result.log.gz pull_3491_result.log.gz added
I see a significant improvement with PR 3491 active. Wallclock went down from ~6 minutes to ~1 minute. Kudos!.
I do still notice a lot of repeat sql queries being done, however (see attached log).
Updated by Taylan Develioglu over 8 years ago
The final PR reduced wallclock time to ~20s! \o/
Updated by Anonymous over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 956055dca1284c80069cd0ff884a7960b53e1143.
Updated by Marek Hulán over 8 years ago
- Translation missing: en.field_release set to 136
Updated by Tomer Brisker about 8 years ago
- Has duplicate Bug #10138: Manage Location and Organization unusable once thousands of nodes are assigned added