1, Resin 服务器响应时间长的问题
适当增加Resin服务器的线程数。在RESIN_HOME/conf/resin.properties里,修改如下参数:
# Throttle the number of active threads for a port
port_thread_max : 5000
accept_thread_max : 5000
accept_thread_min : 1500
keepalive_max : 2000
优化linux系统参数
2, Resin 服务器上多次发布前端页面后,中文乱码的问题
修改 ‘resin/conf/app-default.xml, 在’com.caucho.servlets.FileServlet‘中增加character-encoding
<servlet servlet-name="resin-file"
servlet-class="com.caucho.servlets.FileServlet">
<init>
<character-encoding>UTF-8</character-encoding>
</init>
</servlet>
3, Resin 服务器内存占用率高
RESIN_HOME/conf/resin.properties里的线程参数值,会影响内存占用率
# Throttle the number of active threads for a port
port_thread_max : 5000
accept_thread_max : 5000
accept_thread_min : 1500
keepalive_max : 2000
将上面4个参数值调低。
# Throttle the number of active threads for a port
port_thread_max : 2000
accept_thread_max : 2000
accept_thread_min : 200
keepalive_max : 512
设置jvm参数
jvm_args : -Xms2048m -Xmx2048m -XX:NewRatio=4 -XX:SurvivorRatio=4 -XX:PermSize=350m -XX:MaxPermSize=350m -Xss256K -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseCMSCompactAtFullCollection -XX:+UseFastAccessorMethods -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:-CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=70 -XX:+PrintClassHistogram -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -Xloggc:log/gc.log
4, Resin 服务器ssl设置
resin pro 版不需要下面的SSL设置。
http://wiki4.caucho.com/Setting_up_OpenSSL_with_Resin_4.0.32_on_Ubuntu_12.0.4
Setup OpenSSL with a self-signed certificate
Next let's create a openssl.cnf file in /etc/resin/keys/openssl.cnf
/etc/resin/keys/openssl.cnf
[ req ]
default_bits = 1024
distinguished_name = Caucho
[ Caucho ]
C = US
C_default = US
ST = CA
ST_default = CA
L = San Francisco
L_default = San Francisco
O = Caucho Tech
O_default = Caucho Tech
OU = QA Documentation
OU_default = QA Documentation
CN = www.caucho.com
CN_default = www.caucho.com
emailAddress = info@caucho.com
emailAddress_default = info@caucho.com
Next create your private key file with openssl.
$ cd /etc/resin/keys
$ pwd
/etc/resin/keys
$ sudo openssl genrsa -des3 -out myprivate.key 1024
The above generates an RSA key which can be used both for encryption and for signing.
You will be prompted for a protecting pass phrase.
Output
Generating RSA private key, 1024 bit long modulus
...++++++
..........................++++++
e is 65537 (0x10001)
Enter pass phrase for /etc/resin/myprivate.key:
Verifying - Enter pass phrase for /etc/resin/myprivate.key:
Enter in a password twice. Remember this password, you will need it later.
At this stage, just create a self-signed certificate to see if openssl is working and installed correctly.
$ sudo openssl req -config openssl.cnf -new -key myprivate.key -x509 -out my-self-signed-certificate.crt
Certificates are for public key cryptography and contain the public key. Public keys are easily derived from private keys, and this is why we created the private key first. The certificate is a file that has the organizations information and the public key.
To try this out in Resin, you just need to modify etc/resin/resin.properties as follows:
# OpenSSL certificate configuration
# Keys are typically stored in the resin configuration directory.
openssl_file : keys/my-self-signed-certificate.crt
openssl_key : keys/myprivate.key
openssl_password : password
Just navigate to:
https://mydomain.com:8443/resin-admin/
It should all work now. The browser will complain because you are using a certificate that is not from a certificate authority. Proceed past there errors.
Q1:java.lang.IllegalStateException: Unable to find native library 'resinssl' for com.caucho.vfs.OpenSSLFactory. Resin expects to find this library in:
(Unix) /mnt/resin/libexec64/libresinssl.so
On Unix, run ./configure --prefix=`pwd`; make; make install.
A: 在resin主目录下执行:
./configure --prefix=`pwd`; make; make install
分享到:
相关推荐
resin服务器配制免费版下载 resin服务器配制免费版下载 resin服务器配制免费版下载 resin服务器配制免费版下载 resin服务器配制免费版下载
resin服务器有3部分,resin1,resin-webapp,resin-lib,由于大小限制分开传
resin服务器配置指南,实现resin服务均衡。前台服务均衡
resin服务器有3部分,resin1,resin-webapp,resin-lib,由于大小限制分开传
绿色版resin web服务器 免注册,免安装,简单,功能强大,默认配置
Linux版本的resin服务器 也算是老版本的JavaEE服务器
resin服务器 linux版本
生成验证码,用于resin服务器的验证码生成
resin服务器,zip文件解压之后即可使用
轻量级的resin服务器 轻量级的resin服务器
本系统采用j2sdk进行开发,使用RESIN服务器当做测试服务器,采用mm.mysql.jdbc驱动数据库。使用Dreamweaver编写JSP语言。 计算机等级考试查询系统主要解决不同类型的用户怎样进行不同类型的查询,即超级管理员、系...
myeclipse下配置resin服务器.doc 非常给力的文档!
本系统采用j2sdk1.4.1_07版本进行开发,使用RESIN服务器当做测试服务器,采用mm.mysql.jdbc-2.0pre5驱动数据库。使用Dreamweaver编写JSP语言。 计算机等级考试查询系统主要解决不同类型的用户怎样进行不同类型的查询...
Resin服务器配置指南HYPERLINK"http://michaelzqm.iteye.com/blog/557509"resin虚拟内存设置文章分类:HYPERLINK"http://www.iteye.com/blogs/category/java"Java编程showgrantsforroot@localhost;说明RESIN_HOME-...
比如一台SERVER的错误率是1%的话,那么支持负载平衡的两个Resin服务器就可以使错误率降到0.01%。 Resin 2.1.4( resin-2.1.4.zip),你可以从http://www.caucho.com/download/ 站点上查询Resin的最新版本并下载它...
号称世界上最快的JSP和SERVLET容器。
比如一台SERVER的错误率是1%的话,那么支持负载平衡的两个Resin服务器就可以使错误率降到0.01%。 Resin提供了最快的jsp/servlets运行平台。在java和javascript的支持下,Resin可以为任务灵活选用合适的开发语言。...