Symptoms
Edit or refresh operation fails for all service objects registered under SQL Service Broker service type. It times out after a long time. The endpoints are all confirmed to be available. New service objects can be created successfully but also do not refresh.
Diagnoses
This can be caused by the fact that K2SmartBorker.Smartbroker.ServiceObject (non-consolidated DBs) or K2.Smartbroker.ServiceObject (consolidated DBs) have a lot of inactive records which cause timeout.
Resolution
1. BACKUP the K2 database
2. Run the following queries against your K2 DB:
SELECT count(ServiceInstanceGUID) FROM K2.SmartBroker.ServiceObject WHERE Active = 0
--For non-consolidated DBs:
DELETE FROM K2SmartBroker.SmartBroker.ServiceObject WHERE Active = 0
--For consolidated DBs
DELETE FROM K2.SmartBroker.ServiceObject WHERE Active = 0
3. Restart K2 service