Server connection lost in some seconds

Hi,

When i try to access screen sometime loader on the screen keep on going in the loading state and we get server connection time out in frequent scenarios.

Nothing getting printed in the application logs but in browser console logs we get
Reconnect attempt 3 for XHR on server connection lost scenario.
serverConnectionlots.txt (103.9 KB)

Hi,

Any Help here as the connection are stable but still frequently this is getting popup.

Jmix 1.5.0

unnamed (1)

Can we disable this server connection lost or any logs need to be added to find the cause of this issue

Hi,

from the attached log, I see the following error:

Refused to connect to 'http://kmpl.mcollects.com/mcollect-prime-adfs/oauth2/authorization/adfs' because it violates the following Content Security Policy directive: "connect-src 'self' https://kmpldash.mcollects.com 'unsafe-inline' 'unsafe-eval'"

Also, from your screenshot, I can see that you have errors in the console. Try to investigate them.

Regards,
Gleb

Hi @gorelov,

I had disable the CSP header to check further but still i am facing frequently server connection lost sometime i refresh the page data is loaded on workbench.
Is there any properties to debug the server connection lost issue why it is getting occured sometime within 20 seconds it throws error.
Also i had added below properties will this be helpful.

logging.level.org.atmosphere = debug
logging.level.io.jmix.ui = debug
logging.level.org.springframework.web.socket = debug
logging.level.org.springframework.web.context = debug

Additionally below is already configured

jmix.ui.httpSessionExpirationTimeoutSec=600
vaadin.servlet.heartbeatInterval=-1
vaadin.servlet.close-idle-sessions=true
main.datasource.hikari.connection-timeout=900000

I am getting below logs when application is getting server connection lost and then session expired post that.


2025-05-29 13:51:58,123 DEBUG i.j.u.App.init:207 - [ajp-nio-0.0.0.0-8009-exec-128] Initializing application
2025-05-29 13:51:58,167 DEBUG i.j.u.n.n.NoopNavigationHandler.doHandle:43 - [ajp-nio-0.0.0.0-8009-exec-128] Unable to navigate to empty route: 'NavigationState{root=''}'
2025-05-29 13:54:00,002 DEBUG i.j.u.s.v.JmixVaadinServletService.lambda$new$84f5fb8$1:115 - [Catalina-utility-2] HttpSession destroyed: org.apache.catalina.session.StandardSessionFacade@7208c63d
2025-05-29 13:54:00,013 DEBUG i.j.u.s.v.JmixVaadinServletService.lambda$new$84f5fb8$1:115 - [Catalina-utility-2] HttpSession destroyed: org.apache.catalina.session.StandardSessionFacade@48d60f8d
may have happened because the auth cookie expiried as the site was loading too long
vaadinServlet/PUSH-5

Does the problem reproduces only on the production environment? Could you try to update to the latest Jmix 1.x version and check if the problem persists?