codecentric / spring-boot-admin

Admin UI for administration of spring boot applications
Apache License 2.0
12.39k stars 3.08k forks source link

Dashboard event-stream #972

Closed simo385 closed 6 years ago

simo385 commented 6 years ago

Currently, we're using the following versions:

Spring Boot Version: 1.5.14 Spring boot Admin: 1.5.7

We need to use these versions for architecture constraints.

We've developed a web application with some microservices and we want to use spring-boot-admin to monitor them. To do this, we open two or more SBA dashboard in more than one browser. When the data change, the server sends an update to interface using event-stream protocol. Sometimes, the interface doesn't receive the updates and do not update itself.

We're seeing this issue both for multiple dashboards and one dashboard monitoring.

What can we check? What can we find the logs?

Thanks in advance for the support. Simone

joshiste commented 6 years ago

You should check the eventstream request in the browsers console.

simo385 commented 6 years ago

I did. If I check the browser's console, I see the following scenario:

After server debugging, in particular, JournalController class, it seems the server doesn't send the event for the second client (browser). However, this happens sometimes.

How is the client added to the JournalController.emitters? What could I check on the server side?

Thanks in advance, Simone

joshiste commented 6 years ago

A request to the JournalController#getJournalEvents adds the SseEmitter

simo385 commented 6 years ago

The request works correctly, but sometimes, it seems the server LOSES some client during the execution, in particular when it sends the events.

Is it possible, during the execution, the server removes a SseEmitter wrongly?

joshiste commented 6 years ago

Is it possible, during the execution, the server removes a SseEmitter wrongly?

I don't know.

The best is to upgrade to SBA 2.0 as it doesn't use the Sse emitters. Also I won't do any fix for 1.5.x unless it's critical. Which is imho not the case here.

simo385 commented 6 years ago

I get it. I'll try to fix it.

Thanks for your support.