Replies: 4 comments 3 replies
-
|
First of all, have you tried to latest Jetty and CometD? Are you using HTTP/2? Related to the issue you describe here, there is #1770, but I see that it should be fixed since 8.0.2. Can you share the heap dump? |
Beta Was this translation helpful? Give feedback.
-
|
Unfortunately, the screenshot only shows 25 out of 32 fields (see left panel) and I really need at least 2 of the 7 that are missing. Can you also highlight, for that |
Beta Was this translation helpful? Give feedback.
-
|
@cosimo what client do you use? |
Beta Was this translation helpful? Give feedback.
-
|
This discussion led to issue #2117, fixed in CometD 8.0.9. |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm investigating a case of OOM caused by heap exhaustion. Our servers normally run for months uninterrupted without issues. We had a few cases of servers stopping due to hard OOM errors, as in:
No Java expert here. I've been looking into the heap dump with MAT, and found that the 3GB of heap were 99.9% held up by
org.cometd.server.ServerSessionImplinstances and related retained heap. When diving into the dump data, I can see that each of these objects was storing a long queue ofServerMessageImplobjects, presumably (my hypotesis here) not acknowledged or in some other way "pending". Other internal evidence suggests this could related to some sort of malicious/spammy client traffic.Before I investigate more about this, and how to reproduce it consistently, would there be any circumstances where the ServerSessionImpl objects retain
ServerMessageImplinstances for an abnormal amount of time? Would there be a way to limit this behavior?In other words: is it possible to cause a CometD server to blow up its heap memory usage by firing a lot of clients towards it, and then somehow stall reception of messages, so they would be retained at the server level?
This sort of malfunction is very rare, but it does cause OOM and thus complete server breakdown, hence I'm looking into what's possible to do to understand more about it and prevent it.
Any tips or guidance would be appreciated, thanks 🙏
We're running Java CometD server 8.0.6 on Jetty 12.0.15, JVM is OpenJDK 21 on Ubuntu 24.04.
Beta Was this translation helpful? Give feedback.
All reactions