Bug #10893
closedEditing organizations/locations hangs in 1.8.2
Added by Andy Taylor over 9 years ago. Updated over 7 years ago.
Description
We recently upgraded to Foreman 1.8.2 and since then we've been unable to edit some of our larger organizations/locations, the page request just hangs and load on the server increases significantly. Our largest location consists of 135 hosts. On 1.7.x it would take a long time but it would always return a page.
Updated by Ohad Levy over 9 years ago
- Status changed from New to Need more information
can you please add the relevant log entries? or foreman-debug?
Updated by Marek Hulán over 9 years ago
- Category set to Organizations and Locations
Updated by Andy Taylor over 9 years ago
Apologies for the lack of detail in my original post. I've turned on debug logging and tried the edit again. The logs are then flooded with queries like this:
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT taxable_id FROM `taxable_taxonomies` WHERE `taxable_taxonomies`.`taxable_type` = 'ConfigTemplate' AND `taxable_taxonomies`.`taxonomy_id` IN (7, 6, 4, 5)
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT `config_templates`.* FROM `config_templates` INNER JOIN `config_templates_operatingsystems` ON `config_templates_operatingsystems`.`config_template_id` = `config_templates`.`id` INNER JOIN `operatingsystems` ON `operatingsystems`.`id` = `config_templates_operatingsystems`.`operatingsystem_id` INNER JOIN `template_kinds` ON `template_kinds`.`id` = `config_templates`.`template_kind_id` INNER JOIN `template_combinations` ON `template_combinations`.`config_template_id` = `config_templates`.`id` WHERE `config_templates`.`id` IN (1, 21, 23, 39, 42, 44, 45, 46, 49) AND `operatingsystems`.`id` = 1 AND `template_kinds`.`name` = 'provision' AND `template_combinations`.`hostgroup_id` IS NULL AND `template_combinations`.`environment_id` = 7 ORDER BY config_templates.name LIMIT 1
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 8 or taxonomies.ancestry like '8/%' or taxonomies.ancestry = '8') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 2 or taxonomies.ancestry like '2/%' or taxonomies.ancestry = '2') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 3 or taxonomies.ancestry like '3/%' or taxonomies.ancestry = '3') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 1 or taxonomies.ancestry like '1/%' or taxonomies.ancestry = '1') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT `taxonomies`.* FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Location') AND ( (taxonomies.id in (8,2,3,1))) ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 7 or taxonomies.ancestry like '7/%' or taxonomies.ancestry = '7') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 6 or taxonomies.ancestry like '6/%' or taxonomies.ancestry = '6') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 4 or taxonomies.ancestry like '4/%' or taxonomies.ancestry = '4') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 5 or taxonomies.ancestry like '5/%' or taxonomies.ancestry = '5') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT `taxonomies`.* FROM `taxonomies` WHERE `taxonomies`.`type` IN ('Organization') AND ( (taxonomies.id in (7,6,4,5))) ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 8 or taxonomies.ancestry like '8/%' or taxonomies.ancestry = '8') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 2 or taxonomies.ancestry like '2/%' or taxonomies.ancestry = '2') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 3 or taxonomies.ancestry like '3/%' or taxonomies.ancestry = '3') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 1 or taxonomies.ancestry like '1/%' or taxonomies.ancestry = '1') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT taxable_id FROM `taxable_taxonomies` WHERE `taxable_taxonomies`.`taxable_type` = 'ConfigTemplate' AND `taxable_taxonomies`.`taxonomy_id` IN (8, 2, 3, 1)
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 7 or taxonomies.ancestry like '7/%' or taxonomies.ancestry = '7') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 6 or taxonomies.ancestry like '6/%' or taxonomies.ancestry = '6') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 4 or taxonomies.ancestry like '4/%' or taxonomies.ancestry = '4') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 5 or taxonomies.ancestry like '5/%' or taxonomies.ancestry = '5') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT taxable_id FROM `taxable_taxonomies` WHERE `taxable_taxonomies`.`taxable_type` = 'ConfigTemplate' AND `taxable_taxonomies`.`taxonomy_id` IN (7, 6, 4, 5)
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 8 or taxonomies.ancestry like '8/%' or taxonomies.ancestry = '8') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 2 or taxonomies.ancestry like '2/%' or taxonomies.ancestry = '2') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 3 or taxonomies.ancestry like '3/%' or taxonomies.ancestry = '3') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 1 or taxonomies.ancestry like '1/%' or taxonomies.ancestry = '1') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT taxable_id FROM `taxable_taxonomies` WHERE `taxable_taxonomies`.`taxable_type` = 'ConfigTemplate' AND `taxable_taxonomies`.`taxonomy_id` IN (8, 2, 3, 1)
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 7 or taxonomies.ancestry like '7/%' or taxonomies.ancestry = '7') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 6 or taxonomies.ancestry like '6/%' or taxonomies.ancestry = '6') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 4 or taxonomies.ancestry like '4/%' or taxonomies.ancestry = '4') ORDER BY title
2015-06-22 14:55:56 [D] CACHE (0.0ms) SELECT id FROM `taxonomies` WHERE (taxonomies.id = 5 or taxonomies.ancestry like '5/%' or taxonomies.ancestry = '5') ORDER BY title
This seems to then repeat endlessly. I let it run for 15 minutes, then restarted Foreman to stop the process. This was with a user with restricted access via the roles system.
We then tried it with an admin user and the process completed in 2 minutes, so this appears to be an issue with permissions/the roles system.
Updated by Dominic Cleal over 9 years ago
- Status changed from Need more information to New
Updated by Timo Goebel almost 9 years ago
- Has duplicate Bug #10138: Manage Location and Organization unusable once thousands of nodes are assigned added
Updated by Timo Goebel almost 9 years ago
- Related to Bug #12980: cannot rename organization added
Updated by Dominic Cleal over 8 years ago
- Related to Bug #14924: taxonomies/edit.html.erb takes minutes to render added
Updated by Tomer Brisker about 8 years ago
- Status changed from New to Need more information
Is this still occurring in 1.12 or has it been resolved by #14924?
Updated by Anonymous over 7 years ago
- Status changed from Need more information to Resolved
no reaction, closing.