java.sql.SQLException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
The Connection descriptor used by the client was:
localhost:1521:xe

 

 

 

 

oracle db에 자바어플리케이션상의 jdbc드라이버를 이용하든 암튼 oracle클라이언트를 이용하든,

client는 oracle listner랑 소켙통신을 하죠.
connection을 만들고 안 닫으면, connection하나마다 session이(이게 오라클이깔린 서버의 램을 잠식하죠.

session하나가 1k가 3k가 그런데요. 메모리 leak현상이 발생하고 먹통인된다나 그렇답니다.
근데 이건 하루아침에 되는게아니라 좀 누적이되야하는데요

혹시 db가 xe아닌가요. process수가 넘적어서 그런것 같아요.
sql플러스에서 다음명령어를 해보시죠.

SQL> SHOW PARAMETER PROCESSES // 기본값은 40

db_writer_processes                    integer  1
gcs_server_processes                 integer  0
job_queue_processes                  integer  4
log_archive_max_processes         integer  2
processes                                  integer  40


SQL> ALTER system SET processes=100 scope=spfile;

System altered.

 


SQL> COMMIT;


 

오라클 xe는 기본적으로 세션처리량이 20미만으로 세팅이 되어 있는것 같다.
즉 동시에 20명 미만의 유저만 처리할 수 있다는 말.

해결하려면 system으로 로그인해서 다음의 명령어를 입력해준다

SQL> alter system set processes=200 scope=spfile;
SQL> alter system set open_cursors=200 scope=both;
SQL> shutdown immediate    
SQL> startup
하거나 /etc/init.d/oracle-xe restart로 데몬 재실행


해당 파라미터 값을 수정하는 것은 $ORACLE_HOME/dbs/init.ora 파일과 spfileXE.ora 파일이 설정파일인데,
spfileXE.ora 는 직접수정해서는 안된다.

 


Posted by 에시드 :