表锁超时 Caused by: java.sql.SQLException: errCode = 2, detailMessage = get tableList write lock timeout

Viewed 8

我的Doris版本是2.1.9 用的是默认配置,最近一直报这个错误 生产部署的话需要调整哪些默认配置呢 3台物理机 每台500G内存2T磁盘 3个be3个fe
fe.conf
CUR_DATE=date +%Y%m%d-%H%M%S
JAVA_OPTS="-Dfile.encoding=UTF-8 -Djavax.security.auth.useSubjectCredsOnly=false -Xss4m -Xmx30720m -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:$LOG_DIR/fe.gc.log.$CUR_DATE -Dlog4j2.formatMsgNoLookups=true"
JAVA_OPTS_FOR_JDK_9="-Dfile.encoding=UTF-8 -Djavax.security.auth.useSubjectCredsOnly=false -Xss4m -Xmx30720m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xlog:gc*:$LOG_DIR/fe.gc.log.$CUR_DATE:time -Dlog4j2.formatMsgNoLookups=true"
JAVA_OPTS_FOR_JDK_17="-Dfile.encoding=UTF-8 -Djavax.security.auth.useSubjectCredsOnly=false -XX:+UseG1GC -Xmx30720m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$LOG_DIR/ -Xlog:gc*:$LOG_DIR/fe.gc.log.$CUR_DATE:time"
arrow_flight_sql_port = -1
sys_log_level = INFO
sys_log_mode = NORMAL
lower_case_table_names = 1

be.conf
CUR_DATE=date +%Y%m%d-%H%M%S
JAVA_OPTS="-Dfile.encoding=UTF-8 -Xmx2048m -DlogPath=$LOG_DIR/jni.log -Xloggc:$DORIS_HOME/log/be.gc.log.$CUR_DATE -Djavax.security.auth.useSubjectCredsOnly=false -Dsun.security.krb5.debug=true -Dsun.java.command=DorisBE -XX:-CriticalJNINatives -Darrow.enable_null_check_for_get=false"
JAVA_OPTS_FOR_JDK_9="-Dfile.encoding=UTF-8 -Xmx2048m -DlogPath=$DORIS_HOME/log/jni.log -Xlog:gc:$LOG_DIR/be.gc.log.$CUR_DATE -Djavax.security.auth.useSubjectCredsOnly=false -Dsun.security.krb5.debug=true -Dsun.java.command=DorisBE -XX:-CriticalJNINatives --add-opens=java.base/java.nio=ALL-UNNAMED -Darrow.enable_null_check_for_get=false"
JAVA_OPTS_FOR_JDK_17="-Dfile.encoding=UTF-8 -Xmx2048m -DlogPath=$LOG_DIR/jni.log -Xlog:gc:$LOG_DIR/be.gc.log.$CUR_DATE -Djavax.security.auth.useSubjectCredsOnly=false -Dsun.security.krb5.debug=true -Dsun.java.command=DorisBE -XX:-CriticalJNINatives --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED -Darrow.enable_null_check_for_get=false"
JEMALLOC_CONF="percpu_arena:percpu,background_thread:true,metadata_thp:auto,muzzy_decay_ms:5000,dirty_decay_ms:5000,oversize_threshold:0,prof:true,prof_active:false,lg_prof_interval:-1"
JEMALLOC_PROF_PRFIX="jemalloc_heap_profile_"
arrow_flight_sql_port = -1
enable_https = false
ssl_certificate_path = "$DORIS_HOME/conf/cert.pem"
ssl_private_key_path = "$DORIS_HOME/conf/key.pem"
sys_log_level = INFO
aws_log_level=0
AWS_EC2_METADATA_DISABLED=true
be_port = 9060
webserver_port = 8040
heartbeat_service_port = 9050
brpc_port = 8060
priority_networks = 10.159.65.0/24
LOG_DIR = /data/module/doris-2.1.9/be/log
sys_log_dir = /data/module/doris-2.1.9/be/log
be_node_role = mix
storage_root_path = /data/module/doris-2.1.9/be/storage
JAVA_HOME = /data/module/doris-2.1.9/java8
lower_case_table_names = 1
enable_feature_binlog=true
enable_outfile_to_local=true

mem_limit=80%
string_type_length_soft_limit_bytes=504857600
brpc_max_body_size=6147483648

Doris TID:69993cb76e734289aa05c3aa6dae4e1c.43.17615426956207051] 2025-10-28 05:10:16.125 [ERROR] [1] --- [Report-4] [o.s.a.i.SimpleAsyncUncaughtExceptionHandler.39] : Unexpected exception occurred invoking async method: public void com.dzj.resec.application.util.ParseTemplateContentUtil.fillPatientInfo(com.dzj.resec.domain.sample.model.SampleEntity,java.util.List)
org.springframework.jdbc.UncategorizedSQLException:

Error updating database. Cause: java.sql.SQLException: errCode = 2, detailMessage = get tableList write lock timeout, tableList=(Table [id=15324, name=sample, type=OLAP])

The error may exist in com/dzj/resec/persistence/sample/mapper/SampleMapper.java (best guess)

The error may involve com.dzj.resec.persistence.sample.mapper.SampleMapper.update-Inline

The error occurred while setting parameters

SQL: UPDATE sample SET project_code=?, project_name=?, template_code=?, template_version_code=?, collection_time=?, status=?, submitter_type=?, submit_time=?, is_proxy_submit=?, proxy_submitter=?, patient_age=?, patient_gender=?, patient_province_code=?, patient_province=?, patient_city_code=?, patient_city=?, patient_district_code=?, patient_district=?, disease=?, is_migrate_data=?, submit_location=?, create_time=?, create_account_code=?, create_account_name=?, modify_time=?, modify_account_code=?, modify_account_name=? WHERE is_deleted=0 AND (code = ?)

Cause: java.sql.SQLException: errCode = 2, detailMessage = get tableList write lock timeout, tableList=(Table [id=15324, name=sample, type=OLAP])

; uncategorized SQLException; SQL state [HY000]; error code [1105]; errCode = 2, detailMessage = get tableList write lock timeout, tableList=(Table [id=15324, name=sample, type=OLAP]); nested exception is java.sql.SQLException: errCode = 2, detailMessage = get tableList write lock timeout, tableList=(Table [id=15324, name=sample, type=OLAP])
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)
at com.sun.proxy.$Proxy208.update(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:288)
at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:64)
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)
at com.sun.proxy.$Proxy252.update(Unknown Source)
at com.dzj.resec.persistence.sample.repository.impl.SampleRepositoryImpl.updateSampleByCode(SampleRepositoryImpl.java:254)
at com.dzj.resec.persistence.sample.repository.impl.SampleRepositoryImpl$$FastClassBySpringCGLIB$$3993eb9c.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
at com.dzj.resec.persistence.sample.repository.impl.SampleRepositoryImpl$$EnhancerBySpringCGLIB$$30af2dc7.updateSampleByCode()
at com.dzj.resec.domain.sample.service.impl.SampleDomainServiceImpl.updateSampleByCode(SampleDomainServiceImpl.java:84)
at com.dzj.resec.domain.sample.service.impl.SampleDomainServiceImpl$$FastClassBySpringCGLIB$$ec9deae3.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy.invokeMethod(CglibAopProxy.java:386)
at org.springframework.aop.framework.CglibAopProxy.access$000(CglibAopProxy.java:85)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:704)
at com.dzj.resec.domain.sample.service.impl.SampleDomainServiceImpl$$EnhancerBySpringCGLIB$$bd870252.updateSampleByCode()
at com.dzj.resec.application.util.ParseTemplateContentUtil.fillPatientInfo(ParseTemplateContentUtil.java:287)
at com.dzj.resec.application.util.ParseTemplateContentUtil$$FastClassBySpringCGLIB$$ee01a205.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115)
at org.apache.skywalking.apm.plugin.spring.async.SWCallable.call(SWCallable.java:47)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.sql.SQLException: errCode = 2, detailMessage = get tableList write lock timeout, tableList=(Table [id=15324, name=sample, type=OLAP])
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916)
at com.mysql.cj.jdbc.ClientPreparedStatement.execute$original$OezgmTVs(ClientPreparedStatement.java:354)
at com.mysql.cj.jdbc.ClientPreparedStatement.execute$original$OezgmTVs$accessor$YzDP60VJ(ClientPreparedStatement.java)
at com.mysql.cj.jdbc.ClientPreparedStatement$auxiliary$0rvcpGm6.call(Unknown Source)
at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:86)
at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
at jdk.internal.reflect.GeneratedMethodAccessor188.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)
at com.sun.proxy.$Proxy326.update(Unknown Source)
at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50)
at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
at jdk.internal.reflect.GeneratedMethodAccessor186.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:106)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
at com.sun.proxy.$Proxy325.update(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:194)
at jdk.internal.reflect.GeneratedMethodAccessor185.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)
... 36 common frames omitted

0 Answers