一个resin 4.0.29的样例配置文件,包含jvm的参数

本文提供了一个 Resin 4.0.29 的配置文件示例,详细展示了 JVM 参数配置及集群设置,适用于负载均衡场景。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一个resin 4.0.29的样例配置文件,包含jvm的参数

  (2013-05-03 17:58:15)
标签: 

转载

 
一个resin 4.0.29的样例配置文件:

<!--
     - Resin 4.0 configuration file.
   -->
<resin xmlns="http://caucho.com/ns/resin"
           xmlns:resin="urn:java:com.caucho.resin">

   <!-- property-based Resin configuration -->
   <resin:properties path="${__DIR__}/resin.properties" optional="true"/>
   <resin:properties path="cloud:/resin.properties"
                              optional="true" recover="true"/>


   <resin:if test="${properties_import_url}">
        <resin:properties path="${properties_import_url}"
                              optional="true" recover="true"/>
   </resin:if>


   <!-- Logging configuration for the JDK logging API -->
   <log-handler name="" level="all" path="stdout:"
                       timestamp="[%y-%m-%d %H:%M:%S.%s]"
                       format=" {${thread}} ${log.message}"/>
                      
   <!-- 
        - Alternative pseudo-TTCC log format
        -
        - <log-handler name="" level="all" path="stdout:"
        -                timestamp="%y-%m-%d %H:%M:%S.%s"
        -                format=" [${thread}] ${log.level} ${log.shortName} - ${log.message}"/>
      -->
    
   <!--
        - level='info' for production
        - 'fine' or 'finer' for development and troubleshooting
      -->
   <logger name="" level="${log_level?:'info'}"/>

   <logger name="com.caucho.java" level="config"/>
   <logger name="com.caucho.loader" level="config"/>

   <!--
        - Default configuration applied to all clusters, including
        - HTTP, HTTPS, and /resin-admin configuration.
      -->
   <resin:import path="${__DIR__}/cluster-default.xml"/>
   
   <!--
        - health configuration
      -->
   <resin:import path="${__DIR__}/health.xml"/>

   
   <!--
        - Remote management requires at least one enabled admin user.
      -->
   <resin:AdminAuthenticator>
      <user name="${admin_user}" password="${admin_password}"/>
      
      <resin:import path="${__DIR__}/admin-users.xml" optional="true"/>
      <resin:import path="cloud:/admin-users.xml" optional="true" recover="true"/>
   </resin:AdminAuthenticator>

   <!--
        - For clustered systems, create a password in as cluster_system_key
      -->
   <cluster-system-key>${cluster_system_key}</cluster-system-key>

   <!--
        - For production sites, change dependency-check-interval to something
        - like 600s, so it only checks for updates every 10 minutes.
      -->
   <dependency-check-interval>${dependency_check_interval?:'2s'}</dependency-check-interval>

   <!-- For resin.properties dynamic cluster joining -->
   <home-cluster>${home_cluster}</home-cluster>
   <!-- <home-server>${home_server}</home-server> -->



   <!--
        - Configures the main application cluster.   Load-balancing configurations
        - will also have a web cluster.
      -->
   <cluster id="app">
            
<server-default>
      <jvm-arg>-Xms1024m</jvm-arg>
      <jvm-arg>-Xmx1024m</jvm-arg>
      <jvm-arg>-Xmn256m</jvm-arg>
      <jvm-arg>-XX:PermSize=128m</jvm-arg>
      <jvm-arg>-XX:MaxPermSize=256m</jvm-arg>
      <thread-max>1024</thread-max>
      <socket-timeout>30s</socket-timeout>
      <keepalive-max>512</keepalive-max>
      <keepalive-timeout>60s</keepalive-timeout>
</server-default>

      <!-- define the servers in the cluster -->
      <server-multi id-prefix="app-" address-list="${app_servers}" port="6800"/>

      <host-default>
         <!-- creates the webapps directory for .war expansion -->
         <web-app-deploy path="webapps"
                                 expand-preserve-fileset="WEB-INF/work/**"
                                 multiversion-routing="${webapp_multiversion_routing}"/>
      </host-default>

      <!-- auto virtual host deployment in hosts/foo.example.com/webapps -->
      <host-deploy path="hosts"/>

      <!-- the default host, matching any host name -->
      <host id="" root-directory=".">
         <!--
              - webapps can be overridden/extended in the resin.xml
            -->
         <web-app id="/" root-directory="webapps/ROOT"/>
         
         <resin:if test="${resin_doc}">
            <web-app id="/resin-doc" root-directory="${resin.root}/doc/resin-doc"/>
         </resin:if>
      </host>
   </cluster>

   <cluster id="web">



      <!-- define the servers in the cluster -->
      <server-multi id-prefix="web-" address-list="${web_servers}" port="6810"/>

     <host id="" root-directory="web">
         <web-app id="">
            <resin:LoadBalance regexp="" cluster="app"/>
         </web-app>
      </host>


   </cluster>



<!--
   <cluster id="web-tire">
            <resin:import path="${__DIR__}/vhost/web-tire.xml"/>
   </cluster>
   <cluster id="app-tire">
            <resin:import path="${__DIR__}/vhost/app-tire.xml"/>
   </cluster>
-->


   <cluster id="memcached" xmlns:memcache="urn:java:com.caucho.memcached">
      <!-- define the servers in the cluster -->
      <server-multi id-prefix="memcached-" address-list="${memcached_servers}" port="6820">
         <!-- listen for the memcache protocol -->
         <listen port="${memcached_port?:11211}"
                     keepalive-timeout="600s" socket-timeout="600s">
            <memcache:MemcachedProtocol/>
         </listen>
      </server-multi>
   </cluster>
   
</resin>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值