Closed songjh513 closed 1 month ago
Failure obtaining db row lock: Lock wait timeout exceeded; try restarting transaction mysql 5.7
props : prop.put("org.quartz.scheduler.instanceName", scheduledTaskProperties.getProjectId() + "-scheduler"); prop.put("org.quartz.scheduler.instanceId", getInstanceId()); prop.put("org.quartz.scheduler.skipUpdateCheck", "true"); prop.put("org.quartz.jobStore.class", "org.springframework.scheduling.quartz.LocalDataSourceJobStore"); prop.put("org.quartz.jobStore.driverDelegateClass", "org.quartz.impl.jdbcjobstore.StdJDBCDelegate"); String tablePrefix = "qrtz"; if (StringUtil.isNotEmpty(scheduledTaskProperties.getTablePrefix())) { tablePrefix = scheduledTaskProperties.getTablePrefix() + "" + tablePrefix; } prop.put("org.quartz.jobStore.tablePrefix", tablePrefix); prop.put("org.quartz.jobStore.isClustered", "true"); prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000"); prop.put("org.quartz.jobStore.misfireThreshold", "60000"); prop.put("org.quartz.jobStore.acquireTriggersWithinLock", "true"); prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "40"); prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS WHERE SCHED_NAME = {1} AND LOCK_NAME = ? FOR UPDATE"); prop.put("org.quartz.jobStore.lockHandler.class", "org.quartz.impl.jdbcjobstore.StdRowLockSemaphore"); prop.put("org.quartz.jobStore.lockHandler.maxRetry", "7"); prop.put("org.quartz.jobStore.lockHandler.retryPeriod", "5000"); prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool"); prop.put("org.quartz.threadPool.threadCount", scheduledTaskProperties.getThreadCount()); prop.put("org.quartz.threadPool.threadPriority", Thread.NORM_PRIORITY);
how to resolve ?
Too little info here to act on (stack trace? reproducible test? etc.), and this issue is no several months old. please open new issue with more info if needed.
Failure obtaining db row lock: Lock wait timeout exceeded; try restarting transaction mysql 5.7
props : prop.put("org.quartz.scheduler.instanceName", scheduledTaskProperties.getProjectId() + "-scheduler"); prop.put("org.quartz.scheduler.instanceId", getInstanceId()); prop.put("org.quartz.scheduler.skipUpdateCheck", "true"); prop.put("org.quartz.jobStore.class", "org.springframework.scheduling.quartz.LocalDataSourceJobStore"); prop.put("org.quartz.jobStore.driverDelegateClass", "org.quartz.impl.jdbcjobstore.StdJDBCDelegate"); String tablePrefix = "qrtz"; if (StringUtil.isNotEmpty(scheduledTaskProperties.getTablePrefix())) { tablePrefix = scheduledTaskProperties.getTablePrefix() + "" + tablePrefix; } prop.put("org.quartz.jobStore.tablePrefix", tablePrefix); prop.put("org.quartz.jobStore.isClustered", "true"); prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000"); prop.put("org.quartz.jobStore.misfireThreshold", "60000"); prop.put("org.quartz.jobStore.acquireTriggersWithinLock", "true"); prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "40"); prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS WHERE SCHED_NAME = {1} AND LOCK_NAME = ? FOR UPDATE"); prop.put("org.quartz.jobStore.lockHandler.class", "org.quartz.impl.jdbcjobstore.StdRowLockSemaphore"); prop.put("org.quartz.jobStore.lockHandler.maxRetry", "7"); prop.put("org.quartz.jobStore.lockHandler.retryPeriod", "5000"); prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool"); prop.put("org.quartz.threadPool.threadCount", scheduledTaskProperties.getThreadCount()); prop.put("org.quartz.threadPool.threadPriority", Thread.NORM_PRIORITY);
how to resolve ?