A SQL Server collection fails due to a LOCK REQUEST TIME OUT PERIOD EXCEEDED error.
Collection Status. DBSS_CLR_Assemblies Failed with the exception: Failed to execute query on instance [INSTANCENAME], user account [DOMAIN\USER]. Reason : [[Foglight][SQLServer JDBC Driver][SQLServer]Lock request time out period exceeded.
Increasing the collection timeout does not affect this error.
The lock timeout SQL Server default is -1 which means "no timeout", however the SQL Server agent resets this when the connection is dropped as per SET LOCK_TIMEOUT.
At the beginning of a connection, this setting has a value of -1. After it is changed, the new setting stays in effect for the remainder of the connection. Using an infinite isn’t a good to use because it hides problems that may not be related to the database piece...slow network, dropped connections, etc. Foglight would have no idea of these problems if you tell the computer to wait forever for the command to process.
Increasing the lock timeout could affect another connection by forcing them to wait longer for the lock to release.
WORKAROUND *Specific to lock timeouts due to database creations*
Running a DBCC CheckDB and reindex or rebuild the indexes on the master DB more often may help the issue because of all the database creations.
STATUS
It is not advisable for the database agent to hold a database agent collection for 12 or 15 minutes. This is not tested and can have unknown consequences on the connections and memory usage by FglAM.
def monitoredLockTimeout = "60000";
// find the agent
def agents = server.get("AgentService").findByName(agentName);
if (agents.size() == 0 ) {
return String.format("Failed to find agent: %s", agentName);
}
if (agents.size() > 1 ) {
return String.format("More than 1 agents were found to: %s", agentName);
}
def agent = agents.get(0);
// update agent ASP
def configService = server.get("ConfigService");
def primaryAsp = configService.getAgentInstancePrimaryAsp(agent.getAgentNamespace(), agent.getTypeId(), agent.getId());
primaryAsp.setValueByString("monLockTimeout", monitoredLockTimeout);
configService.saveConfig(primaryAsp);
return String.format("Agent %s ASP successfully updated", agentName);
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center