In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article shows you com.alibaba.druid detection troubleshooting database connections do not release location code how to write, the content is concise and easy to understand, absolutely can make your eyes bright, through the detailed introduction of this article, I hope you can get something.
1. The title may not be very clear. In fact, this is the case. An exception GetConnectionTimeoutException: wait millis 90000, active 22000 appears in the error log of an engineering project, as shown below:
2. The first thing that comes to mind is to increase the maximum number of connections to the database itself, check whether the number of database connections is too small, and balance the usage level and concurrency level of the project. The small statements for querying the database are as follows:
Select value as processes_max from v$parameter where name = 'processes';-- maximum number of connections allowed in the database result 4000select count (*) as process_now from vprocessors;-- current number of process connections select value as session_max from v$parameter where name =' sessions';-- maximum number of session in the database select count (*) as session_now from vprocessors sessions;-- current number of session connections select count (*) as active_now from v$session where status='ACTIVE';-- concurrent connections
3, but when the maximum number of database connections is also adjusted to a reasonable number, and there is nothing wrong with the basic configuration of druid, this can be searched on the Internet, and there are many articles on the general configuration of druid. If there is an exception with insufficient connections, consider whether the program itself has unrecycled connections, sessions and other expenses that accumulate at a certain time, such as the peak of traffic reaching saturation. Then you can add the configuration of druid to help you monitor where there is no recycling.
4. Pay attention to crawling and analyzing the log this time. 5. The result enters the specific java class troubleshooting code, and it is found that there is a problem that session is not recycled. Get rid of it. The above content is com.alibaba.druid detection to check the number of database connections does not release the location code how to write, have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.