Comments (12)
Hello, @sbordet ,
I've found the issue on why the scheduler was not working. Turns out it was not to CometD, it was due to one of my actions. Apologies for the confusion 🙂. Appreciate the time you put into this one. Thanks much.
from cometd.
CometD 3.1.x is now at end of life, as well as CometD 4.0.x, and CometD 5.0.x is at End of Community Support (see #1179).
Would you be able to upgrade to CometD 7.0.x and verify if the problem still happens?
If you use the client-side JavaScript library only, there should not be many differences from 3.1.x and 7.0.x.
from cometd.
@shrihari-prakash I need for information about what you exactly mean by:
when cometd is reconfigured with different URL at runtime
We know that the default scheduler (that attached to the window
object) is throttled by browsers, so we have implemented a scheduler that runs on a Worker
, which is used by default.
Do you have evidence that the Worker
scheduler is also throttled?
from cometd.
Hello @sbordet ,
Here's what I mean when I say "reconfigure":
- Call
cometd.configure({ url: 'http://host/cometd' });
- After a while disconnect the cometd and call
cometd.configure({ url: 'http://**host2**/cometd' });
- Now after handshake, the scheduler randomly stops working (ie, the timeout for sending
/connect
does not execute.
I do not mean to say that the scheduler is being throttled. I suspect when the cometd scheduler methods (like setTimeout) are re-initialized the second time in cometd client code (ie, step 2 of the above scenario), there is a problem where the setTimeout callback for sending connect request is not executed.
In the above scenario I tried putting some logs just before the timeout is called and inside the callback. And I ended up seeing only the log where the setTimeout was called triggered.
cc: @aure-olivier
from cometd.
@shrihari-prakash are you using the Worker
scheduler? Or the window
scheduler?
Seems weird to me that there would be a "random" problem -- from what you describe it would look like a JavaScript bug.
What browser shows this behavior?
Re-instantiating the scheduler is not a problem, but I would like to understand this issue in more detail before trying out speculative changes.
from cometd.
@shrihari-prakash also, let us know if you're willing to upgrade to CometD 7.0.x.
It brings two main features: more modern JavaScript, and TypeScript type definitions in case you're using TypeScript.
Also, it is currently maintained while 3.1.x is at end-of-life and currently abandoned.
As Webtide customer, we can "resurrect" and update CometD 3.1.x for you, but we recommend that you upgrade to CometD 7.0.x instead -- as I said it should be a drop-in dependency update.
The advantage is that you will be up-to-date and kill the technical debt with our help, since we can help you migrate in case there are issues in the upgrade.
from cometd.
@shrihari-prakash also, let us know if you're willing to upgrade to CometD 7.0.x.
It brings two main features: more modern JavaScript, and TypeScript type definitions in case you're using TypeScript.
Also, it is currently maintained while 3.1.x is at end-of-life and currently abandoned.
As Webtide customer, we can "resurrect" and update CometD 3.1.x for you, but we recommend that you upgrade to CometD 7.0.x instead -- as I said it should be a drop-in dependency update.
The advantage is that you will be up-to-date and kill the technical debt with our help, since we can help you migrate in case there are issues in the upgrade.
Hi Simone!
Unfortunately we upgraded to v7 recently and it was working fine, except for IE11 browser which does lot support modern JavaScript instructions ... so we were forced to rollback. IE11 is very old browser and will be out of support at Genesys side soon, but for the moment this is not the case so upgrading to v7 is not an option for the moment.
from cometd.
Hello @sbordet ,
- I am using the worker scheduler. Although, disabling the worker scheduler also fixes the problem, but it is not recommended due to throttling.
- I am noticing that the issue happens on Chrome and Edge Chromium. Works fine with Firefox.
- As Aurelien pointed out, we are unfortunately unable to upgrade to 7.x due to incompatibilities with IE.
from cometd.
@aure-olivier, then at least you can upgrade to CometD 5.0.x, as it still has the old JavaScript syntax?
It will reduce the debt (easier upgrade to CometD 7 or CometD 8 in the future), and we can more easily do a release for 5.0.x.
Do you have more details about when the issue happens?
Do you have the browser tab idle since a long time?
Is the browser tab in background?
from cometd.
Thans @sbordet ,
I checked the latest 5.0.14 version, and it seems fine.
We will likely upgrade to version 5 soon.
For other questions, I'll let @shrihari-prakash answer.
Regards,
Aurélien.
from cometd.
Hi, @sbordet ,
The issue happens when configure
function is called the second time (or sometimes second one succeeds, but third time fails). The handshake actually succeeds, and nothing happens next. The browser is well active and running in foreground while this happens.
from cometd.
@shrihari-prakash do you have logging at DEBUG level when this happens?
Can you reproduce the issue?
I ask because there is not much for us to understand the issue, and your proposed fix (reallocate the scheduler in configure()
) should not be necessary at all, so I am a bit reluctant to add speculative changes.
from cometd.
Related Issues (20)
- stuck tomcat http threads HOT 18
- How to obtain a reference to the BayeuxServer in the SpringBoot CometdApplication HOT 11
- Received message are still being processed after disconnect HOT 9
- When is JakartaEE 10 compatible version release planned for cometd ? HOT 5
- 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 2
- 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
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.