Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current requests with collector server #871

Closed
cocorossello opened this issue Nov 13, 2019 · 8 comments
Closed

Current requests with collector server #871

cocorossello opened this issue Nov 13, 2019 · 8 comments
Labels

Comments

@cocorossello
Copy link
Contributor

Hi,

I have noticed that current requests "forgets" the current requests if running from the collector.

The problem is that we would like to see long running requests and we are using collector server.

It would be ok for us if we could see current requests from the individual monitoring or from the collector itself, I understand that doing this from the collector itself would be hard.

Is there any way to make it work?

@evernat
Copy link
Member

evernat commented Nov 15, 2019

I don't understand well, because the collector server dos not "forget" the current requests. It just does not get them from the monitored application every time and it does not display them in the main report.
But if you click on the "View current requests" link in the report of collector server, the current requests are displayed after being fetched from the monitored application.
So yes, you can already see long running requests, just click the "View current requests" link.

@evernat
Copy link
Member

evernat commented Nov 15, 2019

Is it ok for you?

@evernat
Copy link
Member

evernat commented Nov 15, 2019

By the way, if those requests are finished, they are of course not displayed in the current requests.
And the finished requests are displayed in the statistics and they "increment" mean and max times in the statistics.
There is a potential feature to display in the statistics the last 100 slow requests, if that's what you want. This feature does not exist yet.

@cocorossello
Copy link
Contributor Author

Every time I refresh the current requests page I only get new requests (or none). "Old" running requests are not displayed anymore (and they are still running).

So it's not working for me for some reason. Counters are fine.

@evernat
Copy link
Member

evernat commented Nov 19, 2019

Every time I refresh the current requests page I only get new requests (or none). "Old" running requests are not displayed anymore (and they are still running).

OK.
If the "old" current requests are not displayed in the collector server, how concretely do you find that they are still running ?
When that's the case, can you access the monitoring report of the individual application(s) directly ? And if yes, do you see the missing current requests displayed there ? (Please ignore the red warning at the top of the individual report, for this troubleshooting use case.) Note that if yes, it is not optimal but it is safe indeed to use the report in the individual application(s) to see the current requests.
If all yes, are you sure that the missing current requests are in a monitored application instance which is currently monitored and displayed in the collector server ? Or perhaps you have several application instances aggregated in the collector server and the other instances are monitored but not this instance ? (To be sure, you can check the content of the applications.properties file in the storage directory of the collector server.)

@cocorossello
Copy link
Contributor Author

cocorossello commented Nov 21, 2019

Hi.

This is how I reproduce it.

I create an application, and I have a page that takes 60 seconds to load (just an example).
I start the application and add it to a new collector server.

First case:
I load the page and then I go to current requests in the collector server. First time the request is displayed, but if I refresh the page the request is not there anymore (although I can see it's running).

Second case:
I load the page and I go to the monitoring page on the same app server. I can see the request in current requests. But I refresh the current requests page in the collector server (or the collector server runs the collector), the request is not in the monitoring page of the app server anymore (and it's running)

If I don't use the collector server at all, then I can see the request in the server app's current requests until it's finished, no matter whether I refresh the current requests or not

evernat added a commit that referenced this issue Nov 22, 2019
…once are not displayed anymore after refresh
@evernat
Copy link
Member

evernat commented Nov 23, 2019

Thank you for the issue and thank you for the use case.
In fact, each current request already displayed once is not displayed anymore after refresh. That's the catch which I had not thought.

It is fixed by efa556e and ready for the next release (1.81).
A snapshot build is available at:
http://javamelody.org/downloads/javamelody-core-1.81.0-SNAPSHOT.jar
The fix and the snapshot build is for the javamelody-core in the monitored application.

@evernat evernat closed this as completed Nov 23, 2019
@cocorossello
Copy link
Contributor Author

Thank you!

I tried to look at the code but I had no idea on where to look at. Now I know I would never had found out 😅

goldyliang pushed a commit to goldyliang/javamelody that referenced this issue Mar 17, 2022
…displayed once are not displayed anymore after refresh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants