Project

General

Profile

Actions

Bug #14924

closed

taxonomies/edit.html.erb takes minutes to render

Added by Taylan Develioglu over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Organizations and Locations
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

taxonomies_edit_render.log taxonomies_edit_render.log 30.8 KB Taylan Develioglu, 05/04/2016 05:40 AM
taxonomies_edit_render_w_sql.log.gz taxonomies_edit_render_w_sql.log.gz 2.58 MB Taylan Develioglu, 05/04/2016 06:11 AM
pull_3491_result.log.gz pull_3491_result.log.gz 119 KB Taylan Develioglu, 05/04/2016 08:19 AM

Related issues 2 (0 open2 closed)

Related to Foreman - Bug #10893: Editing organizations/locations hangs in 1.8.2Resolved06/22/2015Actions
Has duplicate Foreman - Bug #10138: Manage Location and Organization unusable once thousands of nodes are assignedDuplicate04/14/2015Actions
Actions #1

Updated by Dominic Cleal over 8 years ago

  • Related to Bug #10893: Editing organizations/locations hangs in 1.8.2 added
Actions #2

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).

Actions #3

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

Actions #4

Updated by Tomer Brisker over 8 years ago

  • Status changed from New to Assigned
  • Assignee set to Tomer Brisker
Actions #5

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
Actions #6

Updated by Taylan Develioglu over 8 years ago

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).

Actions #7

Updated by Taylan Develioglu over 8 years ago

The final PR reduced wallclock time to ~20s! \o/

Actions #8

Updated by Anonymous over 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #9

Updated by Marek Hulán over 8 years ago

  • Translation missing: en.field_release set to 136
Actions #10

Updated by Ohad Levy about 8 years ago

  • Bugzilla link set to 1396642
Actions #11

Updated by Tomer Brisker about 8 years ago

  • Has duplicate Bug #10138: Manage Location and Organization unusable once thousands of nodes are assigned added
Actions #12

Updated by Daniel Lobato Garcia about 8 years ago

  • Target version set to 1.4.3
Actions

Also available in: Atom PDF