从你给出的日志可以看出,问题主要出在AIO数据回传上了。
请尝试两个不同的方法:
1. 优化操作系统的ulimit ,特别是open file文件句柄数要大大调大,把此调优参数放置到 /etc/profile中,并重新登录 shell,重新启动WAS服务器。
2. 如果尝试方法一后,问题依然存在,请使用以下大法,禁用AIO。具体步骤如下:
Disabling AIO (Asynchronous Input/Output) native transport in WebSphere Application Server
Technote (troubleshooting)
Problem(Abstract)
IBM Support might request you to disable the AIO native transport code.
In certain cases, this code can have a fairly large native memory footprint, and if the application server is short on native memory, disabling the AIO native transport can increase the available address space for native memory.
Environment
IBM WebSphere Application Server on Windows, AIX, Linux and HP-UX.
On Solaris, only for versions 7.0.0.5 and earlier, and 6.1.0.17 and earlier. Later WebSphere versions on Solaris no longer have this library.
Diagnosing the problem
IBM Support will be able to tell you if you are seeing an issue with the AIO native code and may recommend disabling it.
Resolving the problem
To disable the AIO native transport code you just need to remove the AIO native libraries. IBM WebSphere Application Server checks for the existence of the AIO native libraries, and if they do not exist, defaults to use the New I/O code (part of the JVM) to return response data to users.
Removing/renaming the libraries is the easiest (Method 1), and so when IBM Support wants you to test with AIO disabled, you should go ahead with this method.
A script can also be run to set a property which will disable the AIO function. This allows the libraries to stay in place, which is a better solution, so that if WebSphere Application Server Fix Packs are later applied, the AIO function will still be disabled.
If you have multiple WebSphere profiles, this is also a better permanent solution, as you can disable AIO for a subset of your application servers, and not just all of them.
If you are going to disable the AIO function for a work-around, and not a test, then you will want the more permanent method of disabling AIO.
Method 1: To disable the AIO function (remove the AIO libraries):
You can remove the libraries, but it is better to just rename the libraries in the same directory so you will know where they are in case you need to re-enable them. Since they are native libraries and not Java .jar files, the name is critical for them to be loaded, so you can just change the extension of the libraries to something else. The libraries are located in theinstall_root/bin directory (usually AppServer/bin).
* UNIX:
mv libibmaio.so libibmaio.disabled
mv libibmaiodbg.so libibmaiodbg.disabled
* Windows:
move ibmaio.dll ibmaio.dis
move ibmaiodbg.dll ibmaiodbg.dis
The application server must be recycled after the libraries have been removed or renamed.
Note: Whenever a WebSphere Fix Pack is installed, the AIO libraries will be reinstalled. You will need to go in and remove them again.
Method 2: To disable the AIO function ( NioTCPChannel):
To set the commClass property, you will need to use a wsadmin script.
To change a group of servers ( server1 and server2) run the following jacl script:
global AdminConfig
set srvlist [$AdminConfig list Server]
foreach srv $srvlist {
set name [$AdminConfig showAttribute $srv name]
if {$name == "server1" ||
$name == "server2"} {
set svc [$AdminConfig list TransportChannelService $srv]
set fact [$AdminConfig create TCPFactory $svc {}]
$AdminConfig create Property $fact {{name commClass} {value com.ibm.ws.tcp.channel.impl.NioTCPChannel}}
puts [$AdminConfig showAttribute $svc factories]
}
}
$AdminConfig save
To change a stand-alone server you would run the following jacl script:
global AdminConfig
set svc [$AdminConfig list TransportChannelService]
set fact [$AdminConfig create TCPFactory $svc {}]
$AdminConfig create Property $fact {{name commClass} {value com.ibm.ws.tcp.channel.impl.NioTCPChannel}}
$AdminConfig save
You will need to edit the script for the application servers you wish to disable AIO for.
Note : Depending on your application and your user load, you may see a performance degradation using NIO versus AIO. In general AIO performs faster and scales better, though NIO is often very sufficient in terms of performance and scale for many scenarios.
收起