公司一次项目事故,项目在正常测试时没有问题,在实际生产并发场景下发生了线程锁死的状况。 后来分析原因,项目中在数据库查询时使用了多线程的写法。项目使用Spring Data JPA, 配置了 spring.jpa.open-in-view: True 该配置是为了关联模型查询方便,但是导致查询结束,当前访问会话未结算的情况下,数据库不释放连接。 后续子线程会尝试继续申请数据库连接,进而导致这种写法…
Leave a Comment月度归档: 2018 年 3 月
若资金允许,请点击https://www.jetbrains.com/idea/buy/购买正版,谢谢合作 学生凭学生证可免费申请正版授权 | 创业公司可5折购买正版授权 使用网络激活 激活地址 https://idea.xiaocaicai.com
Leave a CommentOpenVPN是一个开源应用程序,可以通过公共Internet创建一个专用网络。在我们开始之前,我们首先需要安装Enterprise Linux(EPEL)存储库的额外包。下面就是关于如何在CentOS 7上设置Client和OpenVPN服务器的教程。 1.安装EPEL套件库,顺道更新 yum -y install epel-release && yum -y update 2.…
Leave a Comment问题出现原因 昨晚我修改了数据库,为字段添加了”FULLTEXT”索引,结果今天早上发现数据库连不上了,也没法重启,于是查看日志文件: cat /var/log/mysqld.log 发现如下错误日志: 130728 6:50:14 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) faile…
Leave a CommentCloud computing makes it very affordable to get your own private virtual server on the Internet. Digital Ocean offers an entry level droplet for USD$5 per month, and Amazon.com has a micro instance ti…
Leave a CommentIntroduction MariaDB is an open-source database management system, commonly installed as part of the popular LEMP (Linux, Nginx, MySQL/MariaDB, PHP/Python/Perl) stack. It uses a relational database an…
Leave a Comment