My threads are getting locked while calling
new URL(url).openConnection();
A part of thread dump is:
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195)
- locked <0x00000007056a2498> (a sun.net.www.protocol.http.HttpURLConnection)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
which appears to be locked at
"JakartaHttpHandler-http-timeout-pool-12-thread-1" daemon prio=10 tid=0x0000000046bb6800 nid=0x162 waiting on condition [0x00000000431b7000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000007521c68b8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
In the end heap details say,
compacting perm gen total 41408K, used 41295K [0x00000007fae00000, 0x00000007fd670000, 0x0000000800000000)
the space 41408K, 99% used [0x00000007fae00000, 0x00000007fd653e58, 0x00000007fd654000, 0x00000007fd670000)
Threads do not proceed without throwing any exception.
Firstly, I am planning to change the -XX:MaxPermSize. Is there any other thing I can do?
I am sure, people must have faced this exception.
Thanks in advance.
Go a bit up in the stack trace. Your application is probably opening a connection an external website like for example SpringFramework.org possibly to get XSDs.
See what those websites are and check if they can be accessed from that machine where your application is deployed using wget.