How could I reduce the Hybris server startup time?

前端 未结 11 1870
花落未央
花落未央 2021-02-14 15:08

I am working on a Hybris project and it is very time consuming to wait 350 - 550 sec for a single Hybris server startup, for e

相关标签:
11条回答
  • 2021-02-14 15:23

    I would recommend to use Jrebel - it works like a charm with Hybris, and redeploys beans in runtime. The main advantage is that it's able to reconfigure Spring beans without redeploying, so it really saves much time on server restart.

    There are open-source alternatives, but they weren't suitable for me, though it's worth to look on them: DCEVM and fakereplace

    0 讨论(0)
  • 2021-02-14 15:25

    I'd suggest to disable a few heavy extensions, which you are using during the development process and enable only this extension on which you are working on along with necessary extensions. I don't know, which hybris version you're using, but as far as I know, there gonna be functionality, which should solve your problem in the further releases of the platform, but I'm not 100% sure about that.

    0 讨论(0)
  • 2021-02-14 15:27

    Try Linux (Ubuntu) instead of Windows. The performance difference is amazing. It's like 1/4 of time for a build and 1/2 of time for a server start. I wish I had figured it out earlier!

    0 讨论(0)
  • 2021-02-14 15:30

    you will find in this article all instructions to speed up your server startup time up to 50 % by

    1. disabling Cronjobs
    2. Removing unused tenants
    3. Modifing tomcat startStopThreads
    4. Excluding Some Jars From Scanning

    https://hybrismart.com/2016/12/27/speed-up-server-start-time/

    0 讨论(0)
  • 2021-02-14 15:37

    So I have been using JRebel along with Hybris since past one year.

    Although I have not been able to configure this with my IDE (I am sure there is a simple way), the usage is pretty straightforward.

    After I have modified any java file or spring configuration, in a terminal different from the one I have my server running in, I navigate to the extension in which I have modified the files and then do an ant build. The modified files are picked up by the running server (you can see the new files/configuration being picked up in the server console).

    Regarding the license, I use myJRebel license from https://my.jrebel.com/ which requires a social media login to obtain the license key.

    Steps to Setup -

    1. Download the JRebel Library (standalone zip)
    2. Extract to your preferred location. Mine is C:\Monil\Tools\jrebel
    3. Add following to your local.properties (modify accordingly)

      tomcat.debugjavaoptions=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n -Xverify:none -agentpath:c:/Monil/Tools/jrebel/lib/jrebel64.dll -Xbootclasspath/p:${HYBRIS_TEMP_DIR}/hybris/rebelboot.jar

    Please note that the ${HYBRIS_TEMP_DIR}/hybris/rebelboot.jar jar will automatically be added to hybris temp directly when you do a ant all and start your server.

    0 讨论(0)
提交回复
热议问题