欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

SAP Spartacus SSR模式启用失败的一个原因:SSR rendering exceeded timeout

发布时间:2023/12/19 编程问答 37 豆豆
生活随笔 收集整理的这篇文章主要介绍了 SAP Spartacus SSR模式启用失败的一个原因:SSR rendering exceeded timeout 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

https://github.com/SAP/spartacus/issues/10638

错误消息:SSR rendering exceeded timeout, fallbacking to CSR for /

解决方案

it’s a side effect of a new of SSR optimization feature available in Spartacus 3.0 and up.

It is possible to either extend the timeout in server.ts (passing a second parameter to NgExpressEngineDecorator.get method) or set it to 0, so it won’t be fallbacking to CSR at all. Here is an example:

const ngExpressEngine = NgExpressEngineDecorator.get(engine, { timeout: 0 });

You can use API documentation to get a list of available options:
https://sap.github.io/spartacus/interfaces/SsrOptimizationOptions.html

Additionally, an extended documentation regarding this feature and best practices is on its way.

也可以参考这个文档,进行SAP Spartacus SSR的调试:

How to Debug a Server–Side Rendered Storefront

总结

以上是生活随笔为你收集整理的SAP Spartacus SSR模式启用失败的一个原因:SSR rendering exceeded timeout的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。