--
You received this message because you are subscribed to the Google Groups "Payara Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/16b976a0-daa7-4a58-89b1-81b40836636cn%40googlegroups.com.
For years we've had to occasionally kill the GlassFish/Payara java.exe process because it ran out of memory and became completely unresponsive, using 95% CPU. I originally thought it was related to JDBC connections going bad because the server.log ALWAYS starts with this:Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.7.payara-p2): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: I/O Error: Read timed out
Error Code: 0Which eventually leads to a bunch of these:java.sql.SQLException: java.lang.reflect.UndeclaredThrowableExceptionCaused by: java.lang.reflect.InvocationTargetExceptionCaused by: java.sql.SQLException: Invalid state, the Connection object is closed.We're using the jTDS JDBC driver v1.3.1 with MSSQL server over the internal network. We have the connection pools configured to verify connections before use and to close all connections on discovery of a failure. I'd expect it to recover automatically, but it doesn't.
The issue happened again today. This time I used jmap to get a heap dump and ran it through Visual VM to get some clues. What I found is that there are over 4 million (each) of org.glassfish.grizzly.http.util.CharChunk/BufferChunk/ByteChunk/DataChunk objects using almost 1.5 GB of memory. I've attached a screenshot. This leads me to believe there is a memory leak in grizzly, the HTTP(S) web server component in the Payara application server.
The website hosted in Payara is a high traffic website. When the DB becomes unusable, I'm sure many people are clicking over and over while more new users connect to the web server. That should not cause Payara to go to 95% CPU solid, cause the memory to balloon, or make the website become completely unresponsive. When this issue happens, we test the DB and find that it is up and running fine. When we restart Payara, the DB connections work without issue.
Any suggestions to help further diagnose and fix this issue would be greatly appreciated.
Hi!
Will, nice write-up. Gave me some ideas how to solve one of our long standing problems with Glassfish.
Just couple of questions:
- can you please provide the command-line options of jmap you used to find your memory leak?
- when I try to run jmap against my GlassFish like "jmap PID" I
get "Error attaching to process:
sun.jvm.hotspot.debugger.DebuggerException: Can't attach to the
process". I can attach with my NetBeans debugger to Glassfish.
What am I missing with jmap?
Best regards,
Gregor
--
You received this message because you are subscribed to the Google Groups "Payara Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/CAKMEDdzLwNTJS6RRyb91YUV%3DyNN%2BAvs6-SozcyJDGqtcbQdV%2Bw%40mail.gmail.com.
I've attached a partial log that begins where we started seeing issues today. There are many warnings about tasks being delayed and a "huge system clock jump". That's a big clue. I'm pretty sure this customer is hosting on VMs. If the VM becomes very sluggish, that may be triggering these issues, whatever they are.
--
You received this message because you are subscribed to the Google Groups "Payara Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/426a089c-16a2-f9d0-7801-f5dc2b0ec272%40ryandelaplante.ca.
-- Christoph John Software Engineering T +49 241 557080-28 christo...@macd.com MACD GmbH Oppenhoffallee 103 52066 Aachen, Germany www.macd.com Amtsgericht Aachen: HRB 8151 Ust.-Id: DE 813021663 Geschäftsführer: George Macdonald
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/e4a1fb58-344e-4da8-4bef-f973d1d9bc52%40macd.com.
Just couple of questions:- can you please provide the command-line options of jmap you used to find your memory leak?
- when I try to run jmap against my GlassFish like "jmap PID" I get "Error attaching to process: sun.jvm.hotspot.debugger.DebuggerException: Can't attach to the process". I can attach with my NetBeans debugger to Glassfish. What am I missing with jmap.
Also, do you *only* have problems on machines with clock drift? If yes, I would strongly encourage you to fix that problem first because it can lead to all kind of follow-up problems, e.g. wrong timeouts.
You received this message because you are subscribed to a topic in the Google Groups "Payara Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/payara-forum/KTgFuW1zsg4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to payara-forum...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/e4a1fb58-344e-4da8-4bef-f973d1d9bc52%40macd.com.
Recently I've been experimenting with Microsoft's latest JDBC driver on my dev environment. We're making plans to test it with one customer soon, in case the issue is the jTDS JDBC driver.
Yes the clock drift issue has shown up on multiple customer servers that encounter this issue, and might be the root cause. We will need to look at this closer. Perhaps it has something to do with multiple VMs sharing the same hardware.
The driver is a pure Java driver, unless you need to use XA transactions, in which case there is a DLL that goes with it. However, the DLL must be installed on MSSQL Server itself along with the creation of some tables in the master database, assignment of special roles to users, creation of some special stored procedures, configuration of DTC, etc. I had been using XA DataSources because we're using JTA and multiple databases, but I was able to get it working with regular DataSources recently. I'm not done testing, but if it works well then I will consider dumping jTDS because it is no longer maintained (last released in 2013).
I used to use PostgreSQL with no issues, but customers have MSSQL DBAs, existing clusters and licenses, etc. so we go with what they want.
--
You received this message because you are subscribed to a topic in the Google Groups "Payara Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/payara-forum/KTgFuW1zsg4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to payara-forum...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/3f89a173-c7a3-4472-99a8-7c1a491234fan%40googlegroups.com.
One instance of java.util.WeakHashMap loaded by <system class loader> occupies 1,788,579,160 (83.96%) bytes. The instance is referenced by org.glassfish.grizzly.threadpool.DefaultWorkerThread @ 0x82e86c28 http-thread-pool::http-listener-2(1) , loaded by org.apache.felix.framework.BundleWiringImpl$BundleClassLoader @ 0x82368338.
The thread org.glassfish.grizzly.threadpool.DefaultWorkerThread @ 0x82e86c28 http-thread-pool::http-listener-2(1) keeps local variables with total size 246,592 (0.01%) bytes.
The memory is accumulated in one instance of java.util.TreeMap$Entry, loaded by <system class loader>, which occupies 1,786,697,736 (83.87%) bytes.