C3P0 apparent DEADLOCK when connection pooling is started!!! Error

Source: Internet
Author: User
Tags connection pooling iptables tomcat

after deploying a normal application on the Windows platform to a Linux server, the error has been: com.mchange.v2.async.threadpoolasynchronousrunner$ Deadlockdetector@bbd1b-apparent DEADLOCK!!! Creating Emergency threads for unassigned pending tasks!

check a lot of forums, found that with iptables rules have a lot of relationship, try to close iptables, can solve this problem. Then iptables can not be kept closed, in addition to security considerations, there are some NAT and forwarding to be done by iptables, so iptables is necessary to open, then we need to see what rules to add to solve the problem,

Here are my steps to try:
1. Close Iptables
2. Start Tomcat (the connection pool is automatically started when the Deploy app)
3. View MySQL process, connect MySQL address: localhost
4. Add rule in iptables: iptables-a input-s 127.0.0.1/32-jaccept This rule means: Accept all accesses originating from this machine, according to my present experience, does not increase the obvious security hidden danger;
5. Restart Iptables
6. Restart Tomcat, check the log: The connection pool was found to be ready for success and the issue was resolved.

Outside: Iptables changed, the original Tomcat can not normally shut down the problem has been resolved, it is estimated that Tomcat access to the 8005 port of the machine was blocked by iptables, Tomcat waiting for 8005 port response time-out, resulting in a stop service failure;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.