기술지원 문의
Resin 서버의 잦은 다운 현상에
차재민 / 2002-03-19 00:00
안녕하세요.
Resin 으로 서비스를 하는 사이트에 잦은 다운 현상이 발생하여
아래와 같이 문의 드립니다.
현재 Resin의 잦은 다운으로 인하여 서비스에 많은 문제가 있는 상태입니다.
좋은 답변 부탁드립니다.
- 문제점 Resin 의 잦은 다운 현상
* 웹서버
- Pentium3 866㎒ × 2, 512MB
- Windows2000 Server + IIS + Resin 1.2.5 (jdk1.3)
* 프로그램 : jsp, servlet, java beans + oracle
* 문제점
- 웹서버가 하루에 2~5회씩 다운
- 웹서버 메모리는 평균 20~30% 사용중
- 웹서버 CUP 는 평균 10~20% 사용중
- 웹서버의 메모리와 CPU가 여유가 있음에도 불구하고
웹서버의 Resin 이 다운됨.
- 접속자가 많은 시간에 다운 되는 것 같습니다.
- 같은 환경 설정으로해서 테스트로 돌아가고 있는 서버는 다운 현상이 없음.(접속자가 거의 없음)
- java.exe 프로세스 메모리가
12,000KB## 52,000KB 까지 계속 증가함.(메모리가 줄어들지 않고 계속 증가)
- 사용자 접속이 거의 없는 시간에도 한번 증가한 java.exe 프로세스의 사용 메모리는
줄어들지 않음.
- java.exe 프로세스 메모리가 40,000KB ~ 52,000KB 사이에 거의 Resin 다운
- DB 서버 : 솔라리스 + oracle
# top
last pid: 7024; load averages: 0.15, 0.19, 0.18 17:15:26
139 processes: 81 sleeping, 56 zombie, 1 stopped, 1 on cpu
CPU states: 96.7% idle, 0.6% user, 2.0% kernel, 0.7% iowait, 0.0% swap
Memory: 1024M real, 18M free, 1218M swap in use, 1556M swap free
-> 솔라리스 oracle DB 서버에 free 메모리가 부족해서 그런 것인가요?
- DB 접속은 Connectionpool 사용
Resin.conf 파일을 첨부합니다.
좋은 답변 부탁드립니다.
---------------- 아래는 resin.conf 파일 입니다 -------------------------
##
- The Resin configuration file.
-
- This example file is more complicated than is needs to be because
- it makes several configurations explicit that can be simplified and
- because it needs to configure the examples.
-
- Look in conf/samples for more realistic sample configurations.
- conf/samples/simple.conf - a simple, basic configuration
- conf/samples/deploy.conf - a simple configuration for deployment
-
- The configuration is based on a purely element-based XML. To make
- it easier to read, attributes can be used as syntactic sugar.
-
- The following are equivalent:
- 13 - canonical representation, but verbose
- - typical configuration
- - sometimes useful
##
## Resin logging. You can uncomment the following useful log.
-
-
- href=stderr:
- timestamp=[%H:%M:%S.%s]/>
##
## Security providers. Adding JSSE looks like:
-
##
##
- You can change the compiler to \"internal\" or jikes
- and change the work-dir
##
##
- Sample database pool configuration
- The JDBC name is java:comp/env/jdbc/test
##
jdbc/test
javax.sql.DataSource
##
- Use precompiled JSP classes if available.
- static-encoding - optimization if you stick to one character set
##
##
- For production sites, change class-update-interval to something
- like 60, so it only checks for updates every minute.
##
##
- The root file directory of the server. Apache users will change
- this to /usr/local/apache/htdocs and IIS users will change it
- to d:\\inetpub\\wwwroot
##
d:\\inetpub\\wwwrott
## the http port##
##
- The srun port, read by both JVM and plugin
- 127.0.0.1 is the localhost
##
##
- How to add SSL:
-
-
- true
- pkcs12
- keys/server_cert.p12
- changeit
-
##
##
- Select an error page to display when the connection fails.
-
-
##
## To disable /caucho-status, set this to false##
false
## maximum number of threads##
150
##
- How many threads to wait for keepalives. Should be at least the
- number of Apache processes to get good performance.
##
##
- How long an idle keepalive connection should listen to the socket.
##
##
- How many sockets to hold in the buffer before failing requests.
##
##
- Maximum number of request threads which will wait for a socket.
##
##
- Ping to test if the web server is still up. You can uncomment this
- and point it to pages on the webserver that exercise your main
- logic (like database access). If the GET fails, it will restart
- the server. This will catch deadlocks, but not JDK freezes.
-
-
- http://localhost:8080/ping/ping.jsp
-
##
##
- Enable internal caching.
- dir is the directory containing the cache
- size is the memory size in kb
- entries is the number of entries in the memory cache
##
## ##
## default host if no other host matches##
##
- The standalone server should uncomment for access logging.
- With another web server, like Apache, the web server will
- log this information.
format=%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\"/>
##
##
- Specifies an automatically-expanding .war dir. Any foo.war
- file will be expanded to a /foo application.
##
## how often to check servlets for changes (id used for brevity)##
##
- The classpath directive may be repeated. Source is optional
- Servlets and beans generally belong in WEB-INF/classes
##
source=WEB-INF/classes
compile=false/>
##
- Expires time for a cacheable file. Production sites will
- normally change this to 15m
##
##
- set the pages to be used as welcome (index) files
##
index.xtp, index.jsp, index.html
4096
180
true
true
##
- Store sessions in the filesystem, so they can persist across
- servlet and class changes.
-
- Uncomment this during development.
##
WEB-INF/sessions
## enable multipart-mime/form processing##
##
-
##
##
- special mapping so /servlet/pkg.MyServlet invokes pkg.MyServlet
##
servlet-name=com.caucho.jsp.XtpServlet/>
servlet-name=com.caucho.jsp.JspServlet/>
--------------------- 이하 생략 ---------------------
좋은 답변 부탁드립니다.
[답변]
운영자 / 2002-03-19 00:00
JVM의 메모리 점유 증가로 인한 잦은 다운의 원인은 찾기 힘든 문제입니다. 원인이 프로그램의 문제인지 아니면 JVM자체의 문제인지 규명하기는 어렵습니다. 일단 해볼 수 있는 것은 최신 버전의 resin을 설치해 보는 방법과 java 버전을 변경해 보는 방법 그리고 각종 라이브러리의 update등이 있겠죠. 참고로 개인의 경험 상 프로그램 상의 때문에 메모리 점유 문제가 발생하는 일이 많았습니다.
>========================================================
>제목 : Resin 서버의 잦은 다운 현상에 작성자 : 차재민 등록일 : 2002-02-22 22:02:07
>---------------------------------------------------------------
> 안녕하세요.
>Resin 으로 서비스를 하는 사이트에 잦은 다운 현상이 발생하여
>아래와 같이 문의 드립니다.
>
>현재 Resin의 잦은 다운으로 인하여 서비스에 많은 문제가 있는 상태입니다.
>
>좋은 답변 부탁드립니다.
>
>- 문제점 Resin 의 잦은 다운 현상
>
>* 웹서버
> - Pentium3 866㎒ × 2, 512MB
> - Windows2000 Server + IIS + Resin 1.2.5 (jdk1.3)
>
>* 프로그램 : jsp, servlet, java beans + oracle
>
>
>* 문제점
> - 웹서버가 하루에 2~5회씩 다운
> - 웹서버 메모리는 평균 20~30% 사용중
> - 웹서버 CUP 는 평균 10~20% 사용중
>
> - 웹서버의 메모리와 CPU가 여유가 있음에도 불구하고
> 웹서버의 Resin 이 다운됨.
>
> - 접속자가 많은 시간에 다운 되는 것 같습니다.
>
> - 같은 환경 설정으로해서 테스트로 돌아가고 있는 서버는 다운 현상이 없음.(접속자가 거의 없음)
>
> - java.exe 프로세스 메모리가
> 12,000KB## 52,000KB 까지 계속 증가함.(메모리가 줄어들지 않고 계속 증가)
> - 사용자 접속이 거의 없는 시간에도 한번 증가한 java.exe 프로세스의 사용 메모리는
> 줄어들지 않음.
> - java.exe 프로세스 메모리가 40,000KB ~ 52,000KB 사이에 거의 Resin 다운
>
>
> - DB 서버 : 솔라리스 + oracle
>
> # top
> last pid: 7024; load averages: 0.15, 0.19, 0.18 17:15:26
> 139 processes: 81 sleeping, 56 zombie, 1 stopped, 1 on cpu
> CPU states: 96.7% idle, 0.6% user, 2.0% kernel, 0.7% iowait, 0.0% swap
> Memory: 1024M real, 18M free, 1218M swap in use, 1556M swap free
> -> 솔라리스 oracle DB 서버에 free 메모리가 부족해서 그런 것인가요?
>
> - DB 접속은 Connectionpool 사용
>
> Resin.conf 파일을 첨부합니다.
>
> 좋은 답변 부탁드립니다.
>
>---------------- 아래는 resin.conf 파일 입니다 -------------------------
>
>##
> - The Resin configuration file.
> -
> - This example file is more complicated than is needs to be because
> - it makes several configurations explicit that can be simplified and
> - because it needs to configure the examples.
> -
> - Look in conf/samples for more realistic sample configurations.
> - conf/samples/simple.conf - a simple, basic configuration
> - conf/samples/deploy.conf - a simple configuration for deployment
> -
> - The configuration is based on a purely element-based XML. To make
> - it easier to read, attributes can be used as syntactic sugar.
> -
> - The following are equivalent:
> - 13 - canonical representation, but verbose
> - - typical configuration
> - - sometimes useful
> ##
>
>
>## Resin logging. You can uncomment the following useful log.
> -
> -
>
>
> - href=stderr:
> - timestamp=[%H:%M:%S.%s]/>
> ##
>
>## Security providers. Adding JSSE looks like:
> -
> ##
>
>##
> - You can change the compiler to \"internal\" or jikes
> - and change the work-dir
> ##
>
>
>##
> - Sample database pool configuration
> - The JDBC name is java:comp/env/jdbc/test
> ##
>
> jdbc/test
> javax.sql.DataSource
>
>
>
>
>
>
>
>
>##
> - Use precompiled JSP classes if available.
> - static-encoding - optimization if you stick to one character set
> ##
>
>
>##
> - For production sites, change class-update-interval to something
> - like 60, so it only checks for updates every minute.
> ##
>
> ##
> - The root file directory of the server. Apache users will change
> - this to /usr/local/apache/htdocs and IIS users will change it
> - to d:\\inetpub\\wwwroot
> ##
> d:\\inetpub\\wwwrott
>
> ## the http port##
>
>
> ##
> - The srun port, read by both JVM and plugin
> - 127.0.0.1 is the localhost
> ##
>
>
> ##
> - How to add SSL:
> -
> -
> - true
> - pkcs12
> - keys/server_cert.p12
> - changeit
> -
> ##
>
> ##
> - Select an error page to display when the connection fails.
> -
> -
> ##
>
> ## To disable /caucho-status, set this to false##
> false
>
> ## maximum number of threads##
> 150
>
> ##
> - How many threads to wait for keepalives. Should be at least the
> - number of Apache processes to get good performance.
> ##
>
> ##
> - How long an idle keepalive connection should listen to the socket.
> ##
>
> ##
> - How many sockets to hold in the buffer before failing requests.
> ##
>
> ##
> - Maximum number of request threads which will wait for a socket.
> ##
>
>
> ##
> - Ping to test if the web server is still up. You can uncomment this
> - and point it to pages on the webserver that exercise your main
> - logic (like database access). If the GET fails, it will restart
> - the server. This will catch deadlocks, but not JDK freezes.
> -
> -
> - http://localhost:8080/ping/ping.jsp
> -
> ##
>
> ##
> - Enable internal caching.
> - dir is the directory containing the cache
> - size is the memory size in kb
> - entries is the number of entries in the memory cache
> ##
>
>## ##
> ## default host if no other host matches##
>
> ##
> - The standalone server should uncomment for access logging.
> - With another web server, like Apache, the web server will
> - log this information.
>
> format=%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\"/>
> ##
>
> ##
> - Specifies an automatically-expanding .war dir. Any foo.war
> - file will be expanded to a /foo application.
> ##
>
>
>
> ## how often to check servlets for changes (id used for brevity)##
>
>
> ##
> - The classpath directive may be repeated. Source is optional
> - Servlets and beans generally belong in WEB-INF/classes
> ##
>
> source=WEB-INF/classes
> compile=false/>
>
> ##
> - Expires time for a cacheable file. Production sites will
> - normally change this to 15m
> ##
>
>
> ##
> - set the pages to be used as welcome (index) files
> ##
> index.xtp, index.jsp, index.html
>
>
> 4096
> 180
> true
> true
>
> ##
> - Store sessions in the filesystem, so they can persist across
> - servlet and class changes.
> -
> - Uncomment this during development.
> ##
>
> WEB-INF/sessions
>
>
>
> ## enable multipart-mime/form processing##
> ##
> -
> ##
>
> ##
> - special mapping so /servlet/pkg.MyServlet invokes pkg.MyServlet
> ##
>
>
>
>
>
> servlet-name=com.caucho.jsp.XtpServlet/>
>
> servlet-name=com.caucho.jsp.JspServlet/>
>
>--------------------- 이하 생략 ---------------------
>
>좋은 답변 부탁드립니다.
>========================================================