moer 发表于 2024-4-11 23:21:36

【9.0.103】执行服务端命令返回 504 Gateway Time-out





ServerCommand/sync_policy_public:1
      
      
      Failed to load resource: the server responded with a status of 504 ()
MetadataLoader.js?v=638388379279890865:646/lfhinsmotor_api/ServerCommand/sync_policy_public
error
<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

MetadataLoader.loggedError @ MetadataLoader.js?v=638388379279890865:646

       Explain Console errors by using Copilot in Edge: click
         to explain an error.
      Learn more
      Don't show again


Simon.Sun 发表于 2024-4-11 23:21:37

本帖最后由 Simon.Sun 于 2024-4-12 15:02 编辑

您好,看错误是网关超时了,活字格云网关的超时时间是 300 秒。
不过您说的服务端命令执行超过 300 毫秒,300 毫秒是不会超时的。

如果确实是服务端命令执行比较耗时,超过了 300 秒,建议去异步调用服务端命令,然后通过服务端通知来告知操作是否完成。

一看就会,超有用活字格技能:一百六十三、如何为异步调用的服务端命令增加回调(...
https://gcdn.grapecity.com.cn/showtopic-157053-1-1.html
(出处: 葡萄城开发者社区)


moer 发表于 2024-4-12 00:10:30



调用服务端命令,服务端处理比较长的时间, 会超过300毫秒,然后就有有这样的错误。
在本地机器上测试没有这样的问题。 发布到云服务器就碰到这样的问题。
页: [1]
查看完整版本: 【9.0.103】执行服务端命令返回 504 Gateway Time-out