WebLogic How to set the session timeout time
1 web.xml
Sets the <session-timeout> element in the Web application descriptor Web.xml. This value is in minutes
Units, and overwrite the Timeoutsecs attribute in Weblogic.xml
<session-config>
<session-timeout>54</session-timeout>
</session-config>
This example indicates that the session will expire in 54 minutes
When <session-timeout> is set to-2, it means that the weblogic.xml set in the
Timeoutsecs this property value.
When <session-timeout> is set to-1, the session will never expire, ignoring the
The value of the Timeoutsecs property set in Weblogic.xml.
This property value can be set by using the console console
2 Weblogic.xml
Setting the <session-descriptor> element of the WebLogic-specific deployment descriptor weblogic.xml.
Timeoutsecs property. This value is measured in seconds
<session-descriptor>
<session-param>
<param-name>TimeoutSecs</param-name>
<param-value>3600</param-value>
</session-param>
</session-descriptor>
The default value is 3,600 seconds
Control in 3,jsp
Session.setmaxinactiveinterval (7200);
The session is the default object, which can be referenced directly, in per second s
Control in 4,servlet
HttpSession session = Request.getsession ();
Session.setmaxinactiveinterval (7200);
Per second S
In Weblgoic console: Xxdomain->servers->xxserver->protocols->http has a configuration about post timeout, but this parameter generally uses the default value
Typically through Services-->jdbc-->connection pools-->myconnection (the connection pool name you create)-->configration-->connections Inactive Connection Timeout This parameter to set, the default is 0, indicating that the connection time is infinitely long. You can set a time value that connects over this time value, and it forces the connection back into the connection pool.
<server acceptbacklog= "completehttpmessagetimeout=" 480 "
completemessagetimeout= "idleconnectiontimeout=" "600"
Listenaddress= "" "listenport=" 7001 "name=" MyServer "
Nativeioenabled= "true" reliabledeliverypolicy= "Rmdefaultpolicy"
serverversion= "8.1.4.0" >
Whether to idleconnectiontimeout parameters
Look at the number of inactive Connection timeout and Connection Reserve timeout in the advanced options in the connection pool, and try to make these two bigger.
If the timeout is set at the same time in two files, the web.xml is the same.
Therefore, in the WebLogic environment, it is best to delete the Web.xml setting in the timeout to remain unique.
This is also a customer found the problem, after many experiments found. If you use WebLogic as the application server, setting the session timeout will select the console setting in WebLogic. In fact, the WebLogic is to save the timeout setting in the Weblogic.xml under Web-inf, in the following format: <session-descriptor>
<session-param>
<param-name>TimeoutSecs</param-name>
<param-value>7200</param-value>
</session-param>
The value in </session-descriptor> Param-value is the timeout, in seconds. After you have set this parameter, you will find that the timeout time and must be effective. This is why. Originally in Web-inf also has a configuration file Web.xml, inside also will have a set session, the format is as follows:
<session-config>
The value in <session-timeout>30</session-timeout> </session-config> session-timeout is also a timeout, in minutes. If the timeout is set at the same time in two files, the web.xml is the same. Therefore, in the WebLogic environment, it is best to delete the Web.xml setting in the timeout to remain unique.
This is also a customer found the problem, after many experiments found.
This morning a friend of science and technology has a problem with one of their problems. There is a large number of:
De style= "line-height:normal; ">
Ueue: ' Billproxyqueue ' has been busy for ' 727″seconds working on the request ' Http request:/bill/y
Nquerypublic.go ", which is more than the configured time (stuckthreadmaxtime) of 600″seconds.>
A look is obviously a connection timeout, resulting in an error. Program problem, is not the program does not close the connection if the program is not a problem, it is WebLogic de style= "line-height:normal;" ">stuckthreadmaxtime set too small to cause, general WebLogic server De>de style=" Line-height:normal; ">stuckthreadmaxtime default parameter is 600s, that is 10 minutes, if the concurrent volume is too large, and cause the waiting for processing too much,de> cause the system to continuously increase the thread, causing the thread to block, you can set the parameter large de style=" Line-height:normal; "> This is slightly larger de>de style=" line-height:normal; ">stuckthreadmaxtime parameters can be .de> to see the number of threads set, you can increase the number of threads, this in the WLS console to adjust the