24.4 startup times with JRebel are immense
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
Might be related to https://github.com/vaadin/flow/issues/19261
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.
After a dozen of starts I can say, that having an explicit rebel.xml fixed it for me.
With the latest 24.4.1 it came back. So still something to investigate I assume. :(
I'm experiencing this issue as well. Here's a project you can reproduce it: jrebel issue.zip Steps to reproduce:
- Run
mvn spring-boot:runand observe that the app runs fine. - Debug with JRebel and you will notice a slow start up or maybe even having the build get completely stuck
- Debug without JRebel and notice it works fine
- 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.
I too had to create a rebel.xml file to resolve this issue.
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)
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.
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?
Worth it to add, yes. Thanks, @stefanuebe and @FollowSteph
Documentation has been updated. Is there anything that we can/should investigate regarding JRebel, or can we close this ticket ?