- 浏览: 262859 次
- 性别:
- 来自: 未定
-
文章分类
最新评论
-
zl544434558:
最后一行</filter> 多余的 ...
Springmvc 乱码问题 -
imknown:
方法有效,感谢博主!
Springmvc 乱码问题 -
notafreak:
方法有效,感谢博主
Springmvc 乱码问题 -
linvar:
<div class="quote_title ...
Springmvc 乱码问题 -
ligangdufs:
what about resin
Springmvc 乱码问题
<cluster-default>
<resin:import path="${__DIR__}/app-default.xml"/>
</cluster-default>
<cluster id="app-tier">
<server id="app-a" address="192.168.0.10" port="6800"/>
<server id="app-b" address="192.168.0.11" port="6800"/>
<host id="">
<web-app id="" root-directory="/var/www/htdocs"/>
</host>
</cluster>
<cluster id="web-tier">
<server id="web-a" address="192.168.0.1" port="6800">
<http port="80"/>
</server>
<proxy-cache memory-size="256M"/>
<host id="">
<resin:LoadBalance regexp="" cluster="app-tier"/>
</host>
</cluster>
1.一个resin instance代表一个cluster,只能启动一个cluster中的一个server
#bin/resin.sh -server app-a start
2.jvm
-Xss 单个线程堆栈大小值;JDK5.0以后每个线程堆栈大小为1M
-Xms 启动应用时,JVM堆空间的初始大小值
-Xmx 应用运行中,JVM堆空间的极限值,设置为总内存的80%
-Xmn 此参数硬性规定堆空间的新生代空间大小,初始值和最大值(NewSize,MaxNewSize),推荐设为堆空间大小的1/4
-XX:PermSize和-XX:MaxPermSize分别设置应用服务器启动时,永久存储区的初始大小和极限大小;在生成环境中强烈推荐将这个两个值设置为相同的值,以避免分配永久存储区的开销,具体的值可取系统"疲劳测试"获取到的永久存储区的极限值;
一个JVM虚拟机可有效管理的内存大概在5-6G左右,所以内存多的服务器分配给单个resin实例JVM过多的内存是没有意义的,可以启动多个resin实例
1.The Resin web server starts listening to HTTP requests on port 8080 and listens on port 6800 for load balancer and cluster messages.
2.Garbage collection
There are essentially two GC threads running. One is a very lightweight thread which does "little" collections primarily on the Eden (a.k.a. Young) generation of the heap. The other is the Full GC thread which traverses the entire heap when there is not enough memory left to allocate space for objects which get promoted from the Eden to the older generation(s).
If there is a memory leak or inadequate heap allocated, eventually the older generation will start to run out of room causing the Full GC thread to run (nearly) continuously. Since this process "stops the world", Resin won't be able to respond to requests and they'll start to back up.
The amount allocated for the Eden generation is the value specified with -Xmn. The amount allocated for the older generation is the value of -Xmx minus the -Xmn. Generally, you don't want the Eden to be too big or it will take too long for the GC to look through it for space that can be reclaimed.
3.Stack size
Each thread in the VM gets a stack. The stack size will limit the number of threads that you can have, too big of a stack size and you will run out of memory as each thread is allocated more memory than it needs. 2048k is an appropriate value for most situations.
-Xss the stack size for each thread
-Xss determines the size of the stack: -Xss1024k. If the stack space is too small, eventually you will see a java.lang.StackOverflowError.
Some people have reported that it is necessary to change stack size settings at the OS level for Linux. A call to ulimit may be necessary, and is usually done with a command in /etc/profile:
Limit thread stack size on Linux
unix> ulimit -s 2048
4.Monitoring the JVM
The most useful tool is jconsole.
jps and jstack are also useful
5.resin watchdog
For reliability and security, Resin servers are started and monitored by a separate Resin watchdog process. The watchdog continually checks the health of the Resin server and restarts the Resin instance if is becomes unresponsive.
The standard configuration launches one watchdog per machine which monitors all the Resin JVMs on that matchine, so most sites will not need to change any watchdog configuration.
The watchdog automatically restarts Resin if the Resin JVM ever crashes or exits. So if you want to stop Resin, you need to tell the watchdog to stop the instance, or you can stop the watchdog entirely. The watchdog is typically controlled by the resin.jar main program (ResinBoot), which has commands to start, stop, and restart Resin instances as well as reporting the watchdog status.
发表评论
-
Springmvc 乱码问题
2012-08-24 22:54 12152后端的Tomcat server.xml里配置的<Con ... -
logback note
2012-04-01 16:35 01.logback核心 a.Logger(记录者), b.A ... -
java Cookie
2011-11-01 21:33 1412cookie的组成部分: key, value, maxage ... -
java 正则表达式
2011-10-30 14:53 2178正则表达式的关键是 创建用于"在源字符串中匹配出某些 ... -
java email
2011-10-27 17:04 0http://coolshell.cn/articles/42 ... -
java 定时器
2011-10-27 11:26 01.java.util.Timer 1.1 对应单个后台线程 ... -
Maven note2
2011-04-25 14:16 01.The Build Lifecycle A build ... -
Maven note1
2011-04-24 18:07 01.What is Maven Although there ... -
freemarker使用总结
2010-06-20 16:51 35371.freemarker在使用spring MVC时会出现乱 ... -
springmvc 笔记
2010-05-22 10:27 6864struct2很不好用,springmvc比较给力,跟spr ... -
ibatis3 的返回值
2010-05-11 16:43 1207当执行sqlSession.selectOne("& ... -
java static util, helper
2010-04-18 19:50 1618我们经常会写一些util,helper类, 而一般这些类的方 ... -
Quartz 使用笔记
2010-04-16 21:35 14601.Quartz的主要构件: SchedulerFactory ... -
pinyin4j 笔记
2010-04-05 21:00 1843最近需要将城市名称转换为拼音去访问google weather ... -
ibatis3 的变量
2010-04-05 10:12 1790ibatis的变量其实没什么特别,就是使用#{}定义, 比如 ... -
VPS中的resin3.1和tomcat6
2010-03-28 11:00 1804兴冲冲地在VPS安装了jdk1.6, resin-pro-3. ... -
java URL encoding and decoding
2010-03-19 09:48 8717HTML编码规则是: 字符"a"-&quo ... -
Cookie小解
2010-03-18 19:27 1286Cookie是客户端与服务器 ... -
ibatis3的使用参考
2010-03-12 17:03 3987以前用过ibatis2,但是听说ibatis3有较大的性能提升 ... -
thinking in java (2)
2010-03-11 20:43 9611. Your objects might not get g ...
相关推荐
1. 熟悉电子元件的基本知识:了解电阻、电容、电感、晶体管等基本元件的特性及其在电路中的作用。 2. 掌握电路图的读图规则:理解符号代表的含义,如线段、圆圈、箭头等,这些都是电路图的通用语言。 3. 理解电源和...
windows/linux+ jdk1.4+resin(或tomcat)+jdbc+mysql 5.0 目录结构如下: 本版本数据库采用的是MYSQL,使用JDBC驱动,所以要求有MYSQL的JDBC的驱动程序;将驱动程序放在lib目录下,将WEB-INF目录下的web.xml文件...
(1)windows/linux(目前所用的服务器是redhat 8.0)+jdk1.4+resin+jdbc+mysql 本系统采用jsp编写,数据库采用的是MYSQL,使用JDBC驱动,所以要求有MYSQL的JDBC的驱动程序; (2)本程序的JDBC驱动程序在LIB目录下,在发布...
resin jetty 容灾 日志框架 开源框架 slf4j 框架实现 log4j logback commong logging jdk logger 测试框架 测试框架 junit easymock testng mockito bug管理 禅道 jira 开发工具 编程工具 ...
A novel fiber-optic magnetic field sensor is demonstrated based on a dual-polarization fiber-grating laser, which is embedded in an epoxy resin-bonded magnetostrictive composite material with doped ...
在Java环境中,一个常用的UrlRewrite实现是UrlRewriteFilter,这是一个可以在任何兼容的Web应用程序服务器(如Tomcat、JBoss、Jetty或Resin)上使用的Java Web过滤器。以下是使用UrlRewriteFilter的基本步骤: 1. ...