Java stored procedure call timeout and DBCP parameter configuration instructions

Source: Internet
Author: User
Problem: the production environment real-time tagging times out. Cause: "in the real-time tagging Java service, only the database connection is created, and the database connection is not closed. As a result, the database connection pool is exhausted and the database link cannot be retrieved again "; solution: in the real-time tagging Java service, add "close database connection"; in the real-time tagging stored process, add "Close dblink command at the end, release occupied dblink resources in time" ---- command: dbms_session.close_database_link (conn_my_link); or execute immediate 'alter session close database link dbl_to_pridev '--- use this command; Documentation: If the enables "removeabandoned ", the connection may be recycled by the pool when it is considered leaked. this mechanism is in (getnumidle () <2)
And (getnumactive ()> getmaxactive ()-3) is triggered.
For example, if maxactive = 20, active connection is 18, and idle connection is 1, "removeabandoned" can be triggered ".
However, the active connection is deleted only when it is not used for more than "removeabandonedtimeout". The default value is 300 seconds.
Traveling in the resultset is not calculated as being used.
Related Article

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: 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.