
|
If you were logged in you would be able to see more operations.
|
|
|
| Severity: |
Minor
|
| Runtime: |
N/A
|
| Fix in hand: |
False
|
|
From Mark D.:
There's a ton of information on the web about deploying web applications for large installations.
One of the many things that we worry about in LPS and WebTop is the number of file handles available to the tomcat process.
We in QA do this in a klugey way when we're load testing.
We first login as root and execute:
ulimit -n 150000
Then we run tomcat as normal.
This prepares the system to allow a single process to open large numbers of files. Since each concurrent connection represents at least one file handle, the system needs to allow many more than the defaults (usually 1024)
Also, the -Xmx and -Xms parameters can be important. We usually run (at minimum)
-Xmx512 -Xms256
# The -Xmx value determines the size of the heap to reserve at JVM initialization.
# The -Xms value is the space in memory that is committed to the VM at init. The JVM can grow to the size of -Xmx.
The too few file handles throws the following errors in catalina.out:
java.net.SocketException: Too many open files
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
at java.net.ServerSocket.implAccept(ServerSocket.java:450)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)
at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:408)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:71)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:595)
Jul 20, 2007 5:31:12 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket
WARNING: Reinitializing ServerSocket
Jul 20, 2007 5:31:12 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket
SEVERE: Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080] ignored exception: java.net.SocketException: Too many open fil
es
|
|
Description
|
From Mark D.:
There's a ton of information on the web about deploying web applications for large installations.
One of the many things that we worry about in LPS and WebTop is the number of file handles available to the tomcat process.
We in QA do this in a klugey way when we're load testing.
We first login as root and execute:
ulimit -n 150000
Then we run tomcat as normal.
This prepares the system to allow a single process to open large numbers of files. Since each concurrent connection represents at least one file handle, the system needs to allow many more than the defaults (usually 1024)
Also, the -Xmx and -Xms parameters can be important. We usually run (at minimum)
-Xmx512 -Xms256
# The -Xmx value determines the size of the heap to reserve at JVM initialization.
# The -Xms value is the space in memory that is committed to the VM at init. The JVM can grow to the size of -Xmx.
The too few file handles throws the following errors in catalina.out:
java.net.SocketException: Too many open files
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
at java.net.ServerSocket.implAccept(ServerSocket.java:450)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)
at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:408)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:71)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:595)
Jul 20, 2007 5:31:12 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket
WARNING: Reinitializing ServerSocket
Jul 20, 2007 5:31:12 PM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket
SEVERE: Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080] ignored exception: java.net.SocketException: Too many open fil
es
|
Show » |
|
We also use the `-server` option ourselves (this chooses a GC policy that is supposedly tuned for servers where the expectation is that the program will run for a long time).
And there are commercial Java Applet containers that may be a better choice for your particular application than Tomcat.