What is below is a useful script to print actionable information from garbage collection logs. As shown by the CMS output below, this is built for the CMS collector. Anything with initial-mark or remark in the output is a “stop…
Category: Java
Is “Connection refused” always a network issue?
We are trained to think that if we see “java.net.ConnectException: Connection refused”, we need to talk to our friends in networking. However, below is at least one example where this is not the case. Create a very simple socket server…
When does the CMS collector run by default
Assuming no other flags are set, when the tenured generation heap is 90% full. We have an 7968MB heap, and a 2048MB young generation. As such, our tenured generation is approximately 5920M. Below we show the initial mark starts at…
Interrupting a thread in java
Often, someone will wish to somehow terminate a thread that is causing issues. These issues could be things such as blocking threads that prevent other threads from doing work, or something that is using a lot of CPU. While the…
Dump ATG publishing cluster state
The ATG publishing infrastructure maintains a cluster state file on each target. This is used to sync up with the Business Control Center (“BCC”) content, and ensure they match. When troubleshooting, it can be helpful to print the contents of…
Setting TCPNODELAY on Oracle XA datasource in JBOSS
While troubleshooting performance problems, we wanted to test disabling Nagle’s algorithm in JBOSS with an Oracle XA datasource. We found that property was not configurable in the regular Oracle XA class. We ended up extending the Oracle class to set…
High latch free waits on Oracle XA transactions
We experienced large waits as well as the associated CPU spikes, when using distributed XA transactions in an ATG/JBOSS application server to Oracle database environment. Oracle “support” was, per usual, of absolutely no help is diagnosing the situation. I honestly…
Which threads are talking to the database?
Often while troubleshooting, I will want to know where the bottleneck is. If I think the database may be the culprit, I will run the following to print those threads that are making database calls… -bash-4.1$ jstack 20711 | awk…
Determining the source of high java CPU
This post is related to a situtation in which you find yourself with high CPU utilization, but can’t determine the source. This will gather thread dumps and the CPU used by each thread. For the threads that use a large…
Tying a linux socket file descriptor to a port and IP
While troubleshooting a java thread that appeared to be hung, but not blocked, we used the following troubleshooting process. You can use what is below if you have a thread “stuck” waiting to receive data from another socket. We see…