Comments (10)
If it happens again, please perform the BayeuxServer
dump as explained above, and then via JMX, call BayeuxServer.sweep()
, and check if the sweep actually worked.
Also, consider doing what was done in #960:
subclassing BayeuxServerImpl and overriding sweep to try/catch and log any exception
Let us know how it goes.
from cometd.
CometD 5 is at End of Community Support (#1179).
You should upgrade to CometD 7.
Issue #960 was unexplicable, as apparently an exception slipped out of a catch(Throwable)
which should be impossible.
Please take a JVM thread dump if you can reproduce the issue.
I am not aware of reasons for which the async sweep would stop running. In case of any exception the sweep is re-scheduled, provided that CompletableFuture.whenComplete()
is called.
Let us know if you have more details.
from cometd.
Thanks for the reply.
Haven't been able to reproduce it. We have thread dump from the time when the issue has happened. The scheduler thread from the thread dump is still running responding to /meta/connect's. Don't see the sweeper sweeping any sessions based on the log we have and the sessions have piled up which should have been removed otherwise.
Is there anything from the heap dump that would help understand what could have happened with the sweeper?
from cometd.
Please post the thread dump.
Also, would be useful if you can take a BayeuxServer
dump by calling (via JMX) BayeuxServer.dump()
.
This will dump the internal state of the BayeuxServer
that can help to diagnose what is the issue.
Are you using the HTTP transport or WebSocket?
from cometd.
We are on WebSockets. The server has been restarted since and doesn't exhibit same behavior. Will see if I get the BayeuxServer dump if it happens next time. Below is sample thread dump
BayeuxServerImpl@2204d1-Scheduler-1 Runnable Thread ID: 98
org.cometd.bayeux.server.ServerSession$Extension.outgoing(ServerSession.java:478)
org.cometd.server.ServerSessionImpl.lambda$extendOutgoing$6(ServerSessionImpl.java:312)
org.cometd.server.ServerSessionImpl$$Lambda$6167.apply()
org.cometd.common.AsyncFoldLeft$AbstractLoop.run(AsyncFoldLeft.java:208)
org.cometd.common.AsyncFoldLeft.run(AsyncFoldLeft.java:106)
org.cometd.common.AsyncFoldLeft.reverseRun(AsyncFoldLeft.java:122)
org.cometd.server.ServerSessionImpl.extendOutgoing(ServerSessionImpl.java:310)
org.cometd.server.BayeuxServerImpl.lambda$extendReply$31(BayeuxServerImpl.java:1107)
org.cometd.server.BayeuxServerImpl$$Lambda$6152.accept()
org.cometd.bayeux.Promise$2.succeed(Promise.java:103)
org.cometd.common.AsyncFoldLeft$AbstractLoop.run(AsyncFoldLeft.java:232)
org.cometd.common.AsyncFoldLeft.run(AsyncFoldLeft.java:106)
org.cometd.common.AsyncFoldLeft.reverseRun(AsyncFoldLeft.java:122)
org.cometd.server.BayeuxServerImpl.extendOutgoing(BayeuxServerImpl.java:1083)
org.cometd.server.BayeuxServerImpl.extendReply(BayeuxServerImpl.java:1104)
org.cometd.server.AbstractServerTransport.processReply(AbstractServerTransport.java:247)
org.cometd.server.websocket.common.AbstractWebSocketEndPoint.resume(AbstractWebSocketEndPoint.java:284)
org.cometd.server.websocket.common.AbstractWebSocketEndPoint$WebSocketScheduler.run(AbstractWebSocketEndPoint.java:421)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
java.util.concurrent.FutureTask.run(FutureTask.java:264)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.lang.Thread.run(Thread.java:829)
BayeuxServerImpl@2204d1-Executor-1511183 Parked Thread ID: 1511183
jdk.internal.misc.Unsafe.park(Unsafe.java)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
org.eclipse.jetty.util.BlockingArrayQueue.poll(BlockingArrayQueue.java:382)
org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.idleJobPoll(QueuedThreadPool.java:974)
org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1018)
java.lang.Thread.run(Thread.java:829)
BayeuxServerImpl@2204d1-Executor-1507906 Runnable Thread ID: 1507906
org.cometd.server.ServerSessionImpl.calculateInterval(ServerSessionImpl.java:927)
org.cometd.server.ServerSessionImpl.scheduleExpiration(ServerSessionImpl.java:641)
org.cometd.server.AbstractServerTransport.scheduleExpiration(AbstractServerTransport.java:268)
org.cometd.server.websocket.common.AbstractWebSocketEndPoint$Entry.scheduleExpiration(AbstractWebSocketEndPoint.java:637)
org.cometd.server.websocket.common.AbstractWebSocketEndPoint$Flusher.process(AbstractWebSocketEndPoint.java:552)
org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:223)
org.cometd.server.websocket.common.AbstractWebSocketEndPoint.flush(AbstractWebSocketEndPoint.java:314)
org.cometd.server.websocket.common.AbstractWebSocketEndPoint$WebSocketScheduler.lambda$executeFlush$1(AbstractWebSocketEndPoint.java:393)
org.cometd.server.websocket.common.AbstractWebSocketEndPoint$WebSocketScheduler$$Lambda$7028.run()
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
java.lang.Thread.run(Thread.java:829)
from cometd.
Related Issues (20)
- The BayeuxClient in java sends advice on /meta/connect HOT 6
- long poll protocol stops polling HOT 6
- The Promise in server extensions seems counter to the documentataion HOT 10
- How does a message know it's lazy? HOT 2
- Do lazy channels using the default maxTimeout get that default from the sending or receiving transport? HOT 4
- Cannot share scheduler between `BayeuxClient` and Jetty `HttpClient` HOT 1
- Not all options copied to OortComet instances
- NullPointerException while notifying listener org.cometd.client.transport.LongPollingTransport HOT 1
- Move cometd.js to ES6 HOT 7
- Wrong Jetty version in CometD 6.x/7.x MANIFEST HOT 1
- Support the "Partitioned" cookie attribute HOT 2
- WebSocket transport improvements HOT 6
- Getting NullPointerException on receiving /meta/subscribe message HOT 5
- Wrong processing of Set-Cookie with "expires" with Jetty client HOT 2
- Salesforce Set-Cookie ignored with Jetty client HOT 1
- Idle timeout listener races with long-polling connection re-opening timeout when using `CometDHandler` HOT 1
- Cannot access SessionId from BayeuxContext HOT 10
- `publish` doesn't publish in certain cases HOT 6
- WebSocket session leak leads to OOME
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cometd.