Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 软件时空 > 软件相关 > 增强WebLogic session的粘度
【标  题】:增强WebLogic session的粘度
【关键字】:WebLogic,session
【来  源】:http://www.cublog.cn/u/12331/showart.php?id=255396

增强WebLogic session的粘度

Your Ad Here
以前遇到的一个问题,解决过程如下:
 
集群系统,有2个节点,前端通过apache代理,后台总是报下面的告警,好像是session持久性的问题,
表现在应用上是这样的:当我执行一个查询生成一个临时文件,然后我再去下载这个临时文件时,会话转向另外一个server去查找文件,由于静态的文件不能被failover,所以会发生找不到文件的情况。
<Jan 14, 2007 5:11:33 PM CST> <Warning> <HTTP Session> <BEA-100074> <Primary session was removed during our attempt to retrieve secondary information from the session in the local server for the session: roid: -3937880596723352109 , rsid: [ID: 9LQnFpbPxTjJ1DVGF19hBT947L1vHvBQ2ZrztvQtfPykGRDTht0R Primary: -90604744:192.168.80.10:8004:-1 Secondary: 1696053682:192.168.80.11:8002:-1] , primaryURL: t3://192.168.80.10:8004.>

java.io.FileNotFoundException: /data/cncbss/cncBssCluster/mserver2/applications/DefaultWebApp/DefaultWebApp/account/temp/yMcgF0NBy1zh8hbqCTw41GGWZGYnVYjhJjd2bWvzc2b3stZK3n0j!-90604744!1696053682!1169460641300.dat (No such file or directory)
由于文件是不能被WebLogic集群的,同时也没有采用共享目录的方式使两个节点都访问同一个文件系统,我的想法是让同一个会话的所有请求都发送到同一个节点上,而不要发送到另外一个节点上,这样,上述问题就迎刃而解(不过会带来其他问题,如,负载不是很均衡)。
 
上网求助,某版主要我设置WebLogic cluster的算法是affinity的,我选择了round-robin affinity.
设置后,会话请求按照我的想法发送了,但是又出现了另一个问题,页面打开相当缓慢,开始以为是算法的问题。
后来发现apache的日志里出现很多[error] CONNECTION_REFUSED [os error=0, line 1730 of ../nsapi/URL.cpp]: Error connecting to host错误,于是又上网找资料,没找到什么有用的,又去查看bea的文档,改了KeepAlive On、增大了WebLogic的Accept BackLog大小,又改了系统TCP的参数,好像也没什么用处。最后在文档中看到下面一段话:

The Dynamic Server List

When you use the WebLogicCluster parameter in your httpd.conf or weblogic.conf file to specify a list of WebLogic Servers, the plug-in uses that list as a starting point for load balancing among the members of the cluster. After the first request is routed to one of these servers, a dynamic server list is returned containing an updated list of servers in the cluster. The updated list adds any new servers in the cluster and deletes any that are no longer part of the cluster or that have failed to respond to requests. This list is updated automatically with the HTTP response when a change in the cluster occurs.

试着关闭了DynamicServerList,重启apache,系统页面响应飞快。

我是这样认为的,WebLogic使用了round-robin affinity算法,同时关闭了DynamicServerList就意味着apache不再将请求路由到别的server上。

虚拟主机的配置如下:

<VirtualHost 192.168.0.8:9999>
    ServerName 192.168.0.8:9999
    DocumentRoot /CNC/
    CustomLog "|/usr/local/sbin/cronolog /CNC/ApacheLog/bssCluster/%w/access_9999_log" combined
    <IfModule mod_weblogic.c>
        WebLogicCluster 192.168.0.17:8002,192.168.0.18:8004                                     
        MatchExpression *.jsp
        MatchExpression *.htm
        MatchExpression *.html
        Idempotent ON
        KeepAliveEnabled ON
        DynamicServerList OFF
    </IfModule>
</VirtualHost>

 

IBM ITCAM网管软件导致WebLogic JVM连续产生FULL GC的解决方法:【上一篇】
WebLogic高cpu消耗诊断一例:【下一篇】
【相关文章】
  • IBM ITCAM网管软件导致WebLogic JVM连续产生FULL GC的解决方法
  • JSP一个判断session是否过期的小技巧
  • Session宝典应用深入探讨论(.net 中应用,如何联上SQLServer、临时表…)
  • put your own progress information in V$SESSION_LONGOPS
  • oracle中系统process和session的关系
  • ASP.NET 1.1 无 Cookie SessionID 重写
  • Xdoclet生成SessionBean 和 EntityBean代码(1)
  • Xdoclet生成SessionBean 和 EntityBean代码(2)
  • myeclipse 和 Weblogic ejb 错误
  • php采用数据库保存session
  • 【随机文章】
  • BootROM软件升级
  • [04.25.2006]MCSE笔记9
  • 利用Recognizer编写自己的开机自启动程序
  • 络三维巨匠Adobe Atmosphere基础教程(17)
  • 局域网监听的原理、实现及检测与防范
  • java基础进阶第二步
  • QQ聊天技巧之完整攻略(4)
  • 关于电子邮件中Multipart中Voice-Message的理解
  • 信息系统的粘合剂——PLM 技术
  • 鳃霉病
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.