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

24.4 startup times with JRebel are immense #19459

Closed
Tracked by #5012
stefanuebe opened this issue May 27, 2024 · 11 comments
Closed
Tracked by #5012

24.4 startup times with JRebel are immense #19459

stefanuebe opened this issue May 27, 2024 · 11 comments

Comments

@stefanuebe
Copy link
Contributor

Description of the bug

Beginning with 24.4 it can take a huge amount of time until the application starts to even load the spring basics, when starting it with JRebel debug. I am not sure, why this happens, but it did not happen with 24.3.x.

The application load stucks "forever" on

Connected to the target VM, address: '127.0.0.1:51647', transport: 'socket'

Restarting a few times helps most times, that with the 3rd-4th restart it immediately loads up.

It seems to be irrelevant, which JDK is used. I have the same issue with Amazon's Corretto 17 and Oracle's OpenJDK 22. IDE is Intellij.

Expected behavior

The startup should be as "fast" as with 24.3.

Minimal reproducible example

Download a plain starter project.
Change the version to 24.4.0.beta5.
Start the application, using JRebel debug.

Wait...

Restart multiple times. Sometimes it is faster, sometimes it takes "hours".

Versions

  • Vaadin / Flow version: 24.4.0.beta5
  • Java version: 22 (Oracle OpenJDK) and 17 (Amazon Corretto), but I assume the JDK is irrelevant?
  • OS version: Windows 10
  • Application Server: Spring Boot with Tomcat
  • IDE: Intellij IDEA
@stefanuebe
Copy link
Contributor Author

Might be related to #19261

@stefanuebe
Copy link
Contributor Author

After adding an explicit rebel.xml (generated using the JRebel plugin) in the resources folder it seems like the startup delay is more or less gone. But this might be a coincidence.

image

@stefanuebe
Copy link
Contributor Author

After a dozen of starts I can say, that having an explicit rebel.xml fixed it for me.

@stefanuebe
Copy link
Contributor Author

With the latest 24.4.1 it came back. So still something to investigate I assume. :(

@mcollovati mcollovati moved this from 🆕 Needs triage to 🔎 Investigation in Vaadin Flow bugs & maintenance (Vaadin 10+) Jun 18, 2024
@vesanieminen
Copy link
Contributor

I'm experiencing this issue as well. Here's a project you can reproduce it:
jrebel issue.zip
Steps to reproduce:

  1. Run mvn spring-boot:run and observe that the app runs fine.
  2. Debug with JRebel and you will notice a slow start up or maybe even having the build get completely stuck
  3. Debug without JRebel and notice it works fine
  4. Run with JRebel and without debug and it works fine as well

P.S. you might want to remove my rebel.xml file from src/main/resources. This issue reproduces with or without a local rebel.xml file.

@FollowSteph
Copy link

I too had to create a rebel.xml file to resolve this issue.

@stefanuebe
Copy link
Contributor Author

Any updates on this one? Some 24.4 projects are basically unusable with JRebel more or less (still cannot say why some projects seem to work with a rebel.xml while others never startup, regardless of the project setup)

@FollowSteph
Copy link

I've been in contact with Jrebel and in their last communication they suggested this which worked: Disable the Reactive Debugger feature in IntelliJ,. (File → Settings → Languages & Frameworks → Reactive Streams → uncheck “Enable Reactor Debug mode” checkbox). I'm in the process of following up as to why this is required and so on. Hopefully that helps you and any others experiencing this issue as well. The rebel.xml file trick worked for me for a bit then then stopped working. So far this new suggestion seems to be working consistently.

@stefanuebe
Copy link
Contributor Author

I've been in contact with Jrebel and in their last communication they suggested this which worked: Disable the Reactive Debugger feature in IntelliJ,. (File → Settings → Languages & Frameworks → Reactive Streams → uncheck “Enable Reactor Debug mode” checkbox). I'm in the process of following up as to why this is required and so on. Hopefully that helps you and any others experiencing this issue as well. The rebel.xml file trick worked for me for a bit then then stopped working. So far this new suggestion seems to be working consistently.

Tried it now with two different projects (one very large and a small one) and it seems to be the solution. Thank you very much <3

@mshabarov maybe we should take this into the documentation in the JRebel chapter?

@mshabarov
Copy link
Contributor

Worth it to add, yes. Thanks, @stefanuebe and @FollowSteph

@mshabarov
Copy link
Contributor

mshabarov commented Aug 26, 2024

Documentation has been updated. Is there anything that we can/should investigate regarding JRebel, or can we close this ticket ?

@github-project-automation github-project-automation bot moved this from 🪵Product backlog to Done in Vaadin Flow ongoing work (Vaadin 10+) Nov 26, 2024
@github-project-automation github-project-automation bot moved this from 🔖 Normal Priority (P2) to ✅ Closed in Vaadin Flow bugs & maintenance (Vaadin 10+) Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants