Comments (8)
不配置JTAConfig 是否正常呢
from fastdep.
看这个错误,貌似和全局事物无关
from fastdep.
@louislivi 不配置JTAConfig也不正常,我又做了另外一个测试:不引用fastdep-datasource,单独引用druid-spring-boot-starter、mybatis-spring-boot-starter、spring-boot-starter-jta-atomikos,就不存在连接泄露的问题,请问一下我的fastdep配置有问题吗?
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.21</version>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jta-atomikos</artifactId>
<version>2.4.2</version>
</dependency>
from fastdep.
@WangHanHong 这个看着应该是removeAbandoned
的问题
from fastdep.
removeAbandoned
配置会引发这个问题,建议查看相关问题进行解决。
from fastdep.
@louislivi removeAbandond是打开的,他的作用是强制回收连接,但是我的代码就是一个简单的查询 @RequestMapping("getModel") public String getModel(String id) { List<MsgModel> models = modelMapper.listMsgModelByCondition(new HashMap<String, Object>() {{ put("id", id); }}); return models.get(0).getContent(); }
不存在慢查询的问题,而且我把removeAbandonedTimeout设成了1800s,sql的查询时间在这个范围内,我的业务代码应该不会造成连接泄露,我打开druid的监控显示 始终有6个连接未释放
from fastdep.
removeAbandoned是连接池的高级功能,理论上这中配置不应该出现在实际的生产环境,因为有时应用程序执行长事务,可能这种情况下,会被连接池误回收,该种配置一般在程序测试阶段,为了定位连接泄漏的具体代码位置,被开启。生产环境中连接的关闭应该靠程序自己保证。
from fastdep.
问题的原因不明,也有可能是兼容问题,可以查看源码中进行确认,但是fastdep
做到的仅仅是注入bean的操作,并未针对druid
或者其他依赖相关配置以及源码修改。
from fastdep.
Related Issues (20)
- redis6.0.8 默认配置连接报错 HOT 2
- 只能配置两个redis数据源,我配置了五个,启动报错 HOT 9
- fastdep-shiro-jwt 如何集成redis缓存 HOT 1
- 多数据源启动报错 HOT 3
- redis 多数据源指定的configuration 配置就不生效了, 能够有解决方法吗? HOT 2
- 是不是得先配置redis环境呢? 我跑起来报错 HOT 2
- 文件上传和下载模块 遇到问题 HOT 1
- 全局事务失效 HOT 2
- fastdep-shiro-jwt 怎么在controller 拿到 用户id信息 HOT 2
- 是否支持 jdk1.7 springboot 1.x
- WARN 20240 --- [nio-8081-exec-2] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.example.mapper.OrderMapper.selectPage]
- fastdep-shiro-jwt 缓存不了用户信息
- 官网文档中关于fastdep-shiro-jwt的示例代码有点小问题 HOT 3
- 请问引入包后的后续操作在哪儿呀? HOT 2
- WARNING: transaction manager not running? HOT 1
- fastdep-datasource连接sqlserver数据库数据库事务不生效 HOT 1
- fastdep-redis集群情况下如何链接
- 这样配置可以自动注入正确的数据源吗?is that right?
- fastdep-datasource 不支持 mybatis 的 interceptor?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastdep.