개발자가 많은 사이트에서 간혹 스튜디오 기동시 connection refuse 오류가 발생한다.
이는 JEUS에서 설정한 db connection pool과 통합서버의 http-listener의 thread pool 갯수 (webtob-listener를 사용하고 있다면 webtob-listener의 pool 갯수) 와 연관이 있다.
JEUS 6 기준으로 JEUSMain.xml 파일과 WebMain.xml 파일의 다음 설정 부분을 변경한다. (http-listener 기준)
JEUSMain.xml
<resource>
<data-source>
<database>
<vendor>oracle</vendor>
<export-name>proframe4.0</export-name>
<data-source-class-name>oracle.jdbc.pool.OracleConnectionPoolDataSource</data-source-class-name>
<data-source-type>ConnectionPoolDataSource</data-source-type>
<database-name>ora11c</database-name>
<data-source-name>oracle.jdbc.pool.OracleConnectionPoolDataSource</data-source-name>
<port-number>1521</port-number>
<server-name>xxx.xxx.xxx.xxx</server-name>
<user>xxxx</user>
<password>xxxx</password>
<driver-type>thin</driver-type>
<connection-pool>
<pooling>
<min>50</min>
<max>50</max>
<step>2</step>
<period>600000</period>
</pooling>
</connection-pool>
</database>
</data-source>
WebMain.xml
<?xml version="1.0"?>
<web-container xmlns="http://www.tmaxsoft.com/xml/ns/jeus">
<context-group>
<group-name>MyGroup</group-name>
<print-error-to-browser>true</print-error-to-browser>
<webserver-connection>
<http-listener>
<listener-id>http1</listener-id>
<port>49966</port>
<thread-pool>
<min>50</min>
<max>50</max>
<step>1</step>
</thread-pool>
</http-listener>
</webserver-connection>
</context-group>
<session-cluster>
<session-routing>false</session-routing>
</session-cluster>
</web-container>
Jeus7 이라면 domain.xml 파일의 아래 부분을 수정해준다.
domain.xml
...
...
<web-connections>
<http-listener>
<name>http1</name>
<postdata-read-timeout>30000</postdata-read-timeout>
<max-post-size>-1</max-post-size>
<max-parameter-count>-1</max-parameter-count>
<max-header-count>-1</max-header-count>
<max-header-size>-1</max-header-size>
<max-querystring-size>8192</max-querystring-size>
<server-listener-ref>http-server1</server-listener-ref>
<thread-pool>
<min>50</min>
<max>50</max>
<max-idle-time>300000</max-idle-time>
<max-queue>-1</max-queue>
</thread-pool>
<server-access-control>false</server-access-control>
</http-listener>
...
...
...
<resources>
<data-source>
<database>
<data-source-id>proframe5.0</data-source-id>
<export-name>proframe5.0</export-name>
<data-source-class-name>oracle.jdbc.pool.OracleConnectionPoolDataSource</data-source-class-name>
<data-source-type>ConnectionPoolDataSource</data-source-type>
<vendor>oracle</vendor>
<user>xxxx</user>
<password>xxxx</password>
<login-timeout>0</login-timeout>
<auto-commit>DRIVER</auto-commit>
<stmt-query-timeout>0</stmt-query-timeout>
<pool-destroy-timeout>10000</pool-destroy-timeout>
<property>
<name>driverType</name>
<type>java.lang.String</type>
<value>thin</value>
</property>
<property>
<name>URL</name>
<type>java.lang.String</type>
<value>jdbc:oracle:thin:@xxx.xxx.xxx.xxx:1522/ora12c</value>
</property>
<action-on-connection-leak>Warning</action-on-connection-leak>
<support-xa-emulation>false</support-xa-emulation>
<connection-pool>
<pooling>
<min>50</min>
<max>50</max>
<step>1</step>
<period>3600000</period>
</pooling>
<wait-free-connection>
<enable-wait>false</enable-wait>
<wait-time>10000</wait-time>
</wait-free-connection>
<max-use-count>0</max-use-count>
<dba-timeout>-1</dba-timeout>
<stmt-caching-size>-1</stmt-caching-size>
<stmt-fetch-size>-1</stmt-fetch-size>
<connection-trace>
<enabled>false</enabled>
<get-connection-trace>true</get-connection-trace>
<auto-commit-trace>false</auto-commit-trace>
</connection-trace>
<use-sql-trace>false</use-sql-trace>
<keep-connection-handle-open>false</keep-connection-handle-open>
</connection-pool>
</database>
...
...
pool의 min, max는 동일한 숫자를 맞춰주는것이 좋다.
개발자 숫자보다 조금 여유롭게 connection, thread pool 숫자를 주는것이 좋다.
http-listener 대신 webtob-listener 를 사용하고 있다면 webtob-listner의 min,max pool 숫자를 변경해주면 된다.
소규모 사이트에서는 보통 webserver connection을 http-listener를 사용한다. (개발자 200명 이하)
설정이 webtob에 비해 간편하고 따로 webtob 프로세스를 기동할 필요도 없는데다 사용자수가 많지 않아서 성능차가 거의 없기 때문이다.
하지만 정석은 소규모나 대규모나 webtob-listener를 사용하는것이 안정적이다. (http listener를 활용하는 경우 queue 관리를 못한다)