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 http://blog.sina.com.cn/s/blog_53ed3dae010003qa.htmlhttp://www.blogjava.net/wangxinsh55/archive/2011/04/14/348277.html 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.
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.