Home > Back-end >  Springboot druid mybatis do multiple data sources
Springboot druid mybatis do multiple data sources

Time:01-21

I am using a Druid data source,



Mysql wait_time is 28800 seconds, the transaction is the use of aop manual control,

Programs from time to time during the operation will appear this error, your bosses, what is wrong with this,



The 11:13:05 2021-01-19. 1965954-230 ERROR [n - cron - thread - 8] com. Alibaba. Druid. Util. JdbcUtils: close connection ERROR

Java. SQL. SQLNonTransientConnectionException: Communications link failure during the rollback (). The Transaction resolution unknown.
At com. Mysql. Cj. JDBC. Exceptions. SQLError. CreateSQLException (SQLError. Java: 110)
At com. Mysql. Cj. JDBC. Exceptions. SQLError. CreateSQLException (SQLError. Java: 97)
At com. Mysql. Cj. JDBC. Exceptions. SQLError. CreateSQLException (SQLError. Java: 89)
At com. Mysql. Cj. JDBC. Exceptions. SQLError. CreateSQLException (SQLError. Java: 63)
At com. Mysql. Cj. JDBC. ConnectionImpl. Rollback (ConnectionImpl. Java: 1866)
At com. Mysql. Cj. JDBC. ConnectionImpl. RealClose (ConnectionImpl. Java: 1720)
At com. Mysql. Cj. JDBC. ConnectionImpl. Close (ConnectionImpl. Java: 720)
At com. Alibaba. Druid. Util. JdbcUtils. Close (JdbcUtils. Java: 73)
At com. Alibaba. Druid. Pool. DruidDataSource. DiscardConnection (DruidDataSource. Java: 1340)
At com. Alibaba. Druid. Pool. DruidDataSource. HandleFatalError (DruidDataSource. Java: 1598)
At com. Alibaba. Druid. Pool. DruidDataSource. HandleConnectionException (DruidDataSource. Java: 1540)
At com. Alibaba. Druid. Pool. DruidPooledConnection. HandleException (DruidPooledConnection. Java: 133)
At MIT (751) DruidPooledConnection. Java: com.alibaba.druid.pool.DruidPooledConnection.com
At org) springframework). The JDBC datasource. DataSourceTransactionManager. DoCommit (DataSourceTransactionManager. Java: 329)
The at org. Springframework. Transaction. Support. AbstractPlatformTransactionManager. ProcessCommit (AbstractPlatformTransactionManager. Java: 746)
At MIT (714) AbstractPlatformTransactionManager. Java: org.springframework.transaction.support.AbstractPlatformTransactionManager.com
At com. The guardian. The aspect. MultiDataSourceTransactionAspect. AfterReturning (MultiDataSourceTransactionAspect. Java: 90)
At sun. Reflect. GeneratedMethodAccessor91. Invoke (Unknown Source)
At sun. Reflect. DelegatingMethodAccessorImpl. Invoke (43) DelegatingMethodAccessorImpl. Java:
The at Java. Lang. Reflect. Method. Invoke (498) Method. The Java:
The at org. Springframework. Aop. Aspectj. AbstractAspectJAdvice. InvokeAdviceMethodWithGivenArgs (AbstractAspectJAdvice. Java: 644)
The at org. Springframework. Aop. Aspectj. AbstractAspectJAdvice. InvokeAdviceMethod (AbstractAspectJAdvice. Java: 626)
The at org. Springframework. Aop. Aspectj. AspectJAfterReturningAdvice. AfterReturning (AspectJAfterReturningAdvice. Java: 66)
At org. Springframework. Aop) framework) adapter. AfterReturningAdviceInterceptor. Invoke (AfterReturningAdviceInterceptor. Java: 56)
The at org. Springframework. Aop. Framework. ReflectiveMethodInvocation. Proceed (ReflectiveMethodInvocation. Java: 175)
The at org. Springframework. Aop. Aspectj. AspectJAfterThrowingAdvice. Invoke (AspectJAfterThrowingAdvice. Java: 62)
The at org. Springframework. Aop. Framework. ReflectiveMethodInvocation. Proceed (ReflectiveMethodInvocation. Java: 175)
The at org. Springframework. Aop. Interceptor. ExposeInvocationInterceptor. Invoke (ExposeInvocationInterceptor. Java: 93)
The at org. Springframework. Aop. Framework. ReflectiveMethodInvocation. Proceed (ReflectiveMethodInvocation. Java: 186)
The at org. Springframework. Aop. Framework. CglibAopProxy $DynamicAdvisedInterceptor. Intercept (CglibAopProxy. Java: 688)
At com. Guardian. Synservice. Impl. Ym2NbDataSynServiceImpl $$$$ce0fed7 EnhancerBySpringCGLIB. SynIncrementData (& lt; Generated>)
At com. Guardian. Job. DataSynJob. Ym2nbJob (DataSynJob. Java: 86)
At sun. Reflect. GeneratedMethodAccessor98. Invoke (Unknown Source)
At sun. Reflect. DelegatingMethodAccessorImpl. Invoke (43) DelegatingMethodAccessorImpl. Java:
The at Java. Lang. Reflect. Method. Invoke (498) Method. The Java:
The at org. Springframework. Scheduling. Support. ScheduledMethodRunnable. Run (ScheduledMethodRunnable. Java: 84)
The at org. Springframework. Scheduling. Support. DelegatingErrorHandlingRunnable. Run (DelegatingErrorHandlingRunnable. Java: 54)
The at Java. Util. Concurrent. Executors $RunnableAdapter. Call (511) Executors. Java:
The at Java. Util. Concurrent. FutureTask. RunAndReset (FutureTask. Java: 308)
The at Java. Util. Concurrent. ScheduledThreadPoolExecutor $ScheduledFutureTask. Access the $301 (180) ScheduledThreadPoolExecutor. Java:
The at Java. Util. Concurrent. ScheduledThreadPoolExecutor $ScheduledFutureTask. Run (ScheduledThreadPoolExecutor. Java: 294)
The at Java. Util. Concurrent. ThreadPoolExecutor. RunWorker (ThreadPoolExecutor. Java: 1149)
The at Java. Util. Concurrent. ThreadPoolExecutor $Worker. The run (ThreadPoolExecutor. Java: 624)
The at Java. Lang. Thread. The run (Thread. Java: 748)

11:13:05 2021-01-19. 1965954-231 ERROR [n - cron - thread - 8] com. Alibaba. Druid. Pool. DruidDataSource: this connection

Com.mysql.cj.jdbc.exceptions.Com municationsException: Communications link failure

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related