0

I have a single page application built using lightning web runtime (lwr) that pulls in lwc resources to leverage base components. Everything is deployed and works as expected except for the first time heroku starts up it will timeout, and then several minutes later it's working fine. Is there a caching mechanism I can use for the lwc resources or what is the best practice? Let me know if I should provide any more details, thanks in advance for taking a look!

3
  • 1
    Same here, not able to understand either. Even locally it's slow (but not as slow) and no log anywhere about what's happening. Commented Jun 28, 2022 at 13:45
  • @FabienTaillon I will reproduce with logs and more detail benchmarking the local vs deployed timeout issue. will edit my original question
    – nickforce
    Commented Jun 28, 2022 at 16:29
  • If you know how to display more logs let me know, I don't know how to do it Commented Jun 28, 2022 at 16:30

1 Answer 1

1

Can you try adding the environment variable WARMUP = true? This will pre-compile the site on server start up.

8
  • 1
    How should we do that ? Create a .env file ? I tried it and did not see any difference, should we change anything to the lwr.config.json file ? Commented Jul 5, 2022 at 14:23
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Jul 5, 2022 at 15:58
  • Is there documentation for the WARMUP variable? I tried adding and have seen no difference
    – nickforce
    Commented Jul 9, 2022 at 11:15
  • @kevin-bauer If you want to repro I have a demo (and related heroku app) here: github.com/FabienTaillon/lwc-lwr-oss Commented Jul 11, 2022 at 9:04
  • 1
    This is now working super fast, thank you very much for the help here @KevinBauer ! Commented Sep 14, 2022 at 21:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .