Rancher environment takes too long to load in UI

Hi. The problem is, when I switch to our main Cattle environment it takes up to 1 minute to load. The same is when it is selected as default and user logs in.
Chrome console output shows next: Depaginate, requesting http://server.ip:8080/v2-beta/projects/1a198/volumes?limit=-1&sort=name&marker=m48000 in file collection.js:57

Rancher v1.5.5
Cattle v0.178.3
User Interface v1.5.8

Is there are any way to clear some cache of the environment or debug it some way? I tried stopping all services and hosts - didn’t help.

Using local auth, non-HA setup with internal DB.

You have ~50,000 presumably orphaned volumes, probably caused by something flapping and not cleaning up after itself.

This script is intended for 1.1->1.2 migration but may clean those up, docker run -it --net=container:<id of your server container> rancher/cleanup-1-1 --db-host=localhost

Thank you, but I already tried that, “0 rows deleted”. Didn’t help. also this output was received

19:46:35.591 [io.cattle.platform.core.cleanup.Main.main()] ERROR i.c.p.core.cleanup.TableCleanup - SQL [delete from service where service.id in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; Cannot delete or update a parent row: a foreign key constraint fails (cattle.deployment_unit, CONSTRAINT fk_deployment_unit__service_id FOREIGN KEY (service_id) REFERENCES service (id) ON DELETE NO ACTION ON UPDATE NO ACTION)
19:46:35.592 [io.cattle.platform.core.cleanup.Main.main()] ERROR i.c.p.core.cleanup.TableCleanup - Skipped “cattle”.“service” where id in [21, 22, 23, 24, 83, 84]
Wed Apr 12 19:46:35 UTC 2017 environment: 0
19:46:35.601 [io.cattle.platform.core.cleanup.Main.main()] ERROR i.c.p.core.cleanup.TableCleanup - Skipped “cattle”.“environment” where id in [10, 11, 12, 13, 14, 23, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58]
Wed Apr 12 19:46:35 UTC 2017 credential: 0
19:46:35.607 [io.cattle.platform.core.cleanup.Main.main()] ERROR i.c.p.core.cleanup.TableCleanup - Skipped “cattle”.“credential” where id in [86]
Wed Apr 12 19:46:35 UTC 2017 storage_pool: 0
19:46:35.615 [io.cattle.platform.core.cleanup.Main.main()] ERROR i.c.p.core.cleanup.TableCleanup - Skipped “cattle”.“storage_pool” where id in [6]
Wed Apr 12 19:46:35 UTC 2017 agent: 0
19:46:35.626 [io.cattle.platform.core.cleanup.Main.main()] ERROR i.c.p.core.cleanup.TableCleanup - Skipped “cattle”.“agent” where id in [9, 18, 27, 36, 48, 55, 58, 61, 64, 70, 72, 73, 74, 79, 83, 86, 89, 95, 101, 111, 117, 121, 144, 171, 187, 188, 193, 199, 210, 212, 214, 216, 219, 225, 226, 255, 266, 306, 313, 316, 319, 322, 327, 330, 344, 345, 359, 364, 442, 456, 459, 465, 602, 624, 627, 632, 655, 658, 669, 684, 686, 690, 693, 696, 773, 777, 782, 869, 874, 878, 882, 886, 890, 894, 899, 903, 914, 924, 941, 945, 955, 970, 977, 978, 983, 990, 1001, 1006, 1014, 1033, 1054, 1059, 1068, 1074, 1089, 1092, 1105, 1108, 1123, 1124, 1128, 1139, 1140, 1144, 252, 867, 1107, 1133, 168, 169, 170, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 186, 1101, 1102, 1148, 1149, 1150, 1152, 1156, 1157, 1158, 1160]
Wed Apr 12 19:46:35 UTC 2017 account: 0
19:46:35.760 [io.cattle.platform.core.cleanup.Main.main()] ERROR i.c.p.core.cleanup.TableCleanup - Skipped “cattle”.“account” where id in [82, 1171, 1173, 1174, 1175, 18, 25, 34, 43, 55, 62, 65, 68, 71, 77, 79, 80, 81, 87, 91, 94, 97, 103, 109, 119, 125, 129, 153, 177, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 195, 196, 197, 201, 209, 220, 222, 224, 226, 229, 235, 236, 262, 265, 276, 316, 323, 326, 329, 332, 337, 340, 354, 355, 369, 374, 452, 466, 469, 475, 612, 634, 637, 642, 665, 668, 679, 694, 695, 700, 703, 706, 783, 788, 792, 879, 881, 887, 891, 895, 899, 903, 907, 912, 916, 927, 937, 954, 958, 968, 979, 990, 991, 996, 1003, 1014, 1019, 1027, 1046, 1068, 1072, 1081, 1087, 1101, 1104, 1114, 1115, 1118, 1120, 1121, 1136, 1138, 1142, 1147, 1154, 1155, 1160, 1164, 1165, 1166, 1168, 1178, 1179, 1180, 1182]

I am also experiencing rancher slowdown on one of my environments. I’m sure it is due to having one of my containers “flapping” with constant restarts. I’ve tried the rancher/cleanup but unable to get it to work.

I’ve tried
docker run -it --network=container:64fa54ea815a rancher/cleanup-1-1 --db-host localhost db-port xxxx --db-user xxxxxx --db-pass xxxxxx --db-name cattle

get
java.sql.SQLInvalidAuthorizationSpecException: Could not connect: Access denied for user ‘cattle’@‘127.0.0.1’ (using password: YES)

I’ve read where cleanup should not be required, but the UI is getting very slow and was hoping this might clean up some of the old audit logs