需要更新的數據有1100條,我連接的時候一直報錯
ORA-12518, TNS:listener could not hand off client connection
根據商品的文章設置了最大連接數為:1200,session為1200*1.1+5=1325,但是tomcat還是報錯
ORA-12518, TNS:listener could not hand off client connection
查看最大連接數:
SQL> show parameter processes;processes integer 1200
查看當前的的數據庫v$processes 只有356,v$session 352
PMON每5分鐘更新listener中的內容,所以listener和數據庫不一定是同步的,你現在從數據庫上得知有356個連接,並不代表listener裡面記錄的是356個, 5分鐘之內很可能還沒有被pmon更新,依然保持著1200所以你報錯ORA-12518 而不是ora-00020
SQL> show parameter pga; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ pga_aggregate_target big integer 194M SQL> select * from v$resource_limit; RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_ALLOCATION LIMIT_VALUE ------------------------------ ------------------- --------------- -------------------- -------------------- processes 24 366 1200 1200 sessions 27 362 1325 1325 enqueue_locks 15 25 15950 15950 enqueue_resources 15 43 6048 UNLIMITED ges_procs 0 0 0 0 ges_ress 0 0 0 UNLIMITED ges_locks 0 0 0 UNLIMITED ges_cache_ress 0 0 0 UNLIMITED ges_reg_msgs 0 0 0 UNLIMITED ges_big_msgs 0 0 0 UNLIMITED ges_rsv_msgs 0 0 0 0 gcs_resources 0 0 0 0 gcs_shadows 0 0 0 0 dml_locks 0 51 5828 UNLIMITED temporary_table_locks 0 3 UNLIMITED UNLIMITED transactions 1 7 1457 UNLIMITED branches 0 0 1457 UNLIMITED cmtcallbk 0 2 1457 UNLIMITED sort_segment_locks 0 3 UNLIMITED UNLIMITED max_rollback_segments 11 11 1457 65535 RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_ALLOCATION LIMIT_VALUE ------------------------------ ------------------- --------------- -------------------- -------------------- max_shared_servers 1 1 UNLIMITED UNLIMITED parallel_max_servers 0 0 40 3600 22 rows selected