In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "what to do if the Java program gets stuck". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Get field fault information jstack 6688
The parameter is PID. When we look at the stack information, we find that there is no class related to our own program, but we find the following sentence:
"Druid-ConnectionPool-Create-418179060" # 25 daemon prio=5 os_prio=0 tid=0x00007fa74d8ad000 nid=0x15a84 waiting on condition [0x00007fa6f8a30000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park (Native Method)-parking to wait for (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park (LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java: 2039) at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run (DruidDataSource.java:2480)
Oh, it turns out that Druid is waiting for the thread to get stuck, so what should I do?
two。 Retrieve the solution according to the printed information
Started using Bing to search and found this discussion: thread stuck on druiddatasource
3. Try based on the information retrieved
Since it was mentioned in the discussion that it might be related to the version, I checked the version I used and found that the version was very new and the possibility of problems was very small. Then increase the maximum active number to carry on the experiment. I found that after increasing the maximum number of active users, I used the top command to query. Sure enough, the cpu occupancy rate was no longer very low, and cpu began to run happily. Passed this concurrent number of stress tests.
4. Other useful ideas
If you can't find the desired results in Chinese, try to search in English.
If you have tried three solutions and failed or have tried for half a working day, please report to the next level immediately or consult the experienced personnel around you (the job is not a training ground, the most important thing to solve the problem).
This is the end of the content of "what to do if the Java program gets stuck". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.