简体   繁体   English

使用 ASP.NET Core NodeServices 时配置节点 HTTP 服务器超时

[英]Configure Node HTTP server timeout when using ASP.NET Core NodeServices

TL;DR: Is it possible to configure the Node HTTP server timeout from ASP.NET Core's NodeServices APIs? TL;DR:是否可以从 ASP.NET Core 的 NodeServices API 配置节点 HTTP 服务器超时? Or in any other way from within the invoked Node module?或者在调用的 Node 模块中以任何其他方式?


We're using ASP.NET Core's NodeServices APIs to invoke JavaScript modules that generate PDFs using the node-html-pdf library.我们使用 ASP.NET Core 的NodeServices API 来调用使用node-html-pdf库生成 PDF 的 JavaScript 模块。

Due to the content of the PDFs, processing time is exceeding two minutes, which is the default timeout for the Node HTTP server which is being created as part of the ASP.NET Core NodeServices run time.由于 PDF 的内容,处理时间超过两分钟,这是作为 ASP.NET Core NodeServices 运行时的一部分创建的 Node HTTP 服务器的默认超时

When this timeout is reached, the Node HTTP server closes the connection to the calling service (even though process execution still continues), meaning it's impossible to get the complete PDF back from the Node module.当达到此超时时间时,Node HTTP 服务器关闭与调用服务的连接(即使进程执行仍在继续),这意味着不可能从 Node 模块取回完整的 PDF。

From what I can see, it's not possible to configure this timeout currently.据我所知,目前无法配置此超时。

  1. Is it possible to configure this timeout from the NodeServices APIs?是否可以从 NodeServices API 配置此超时?
  2. Is it possible to configure this timeout from within the Node module being invoked?是否可以从正在调用的 Node 模块中配置此超时?

In short, the answer to my question is no, it's not possible.简而言之,我的问题的答案是否定的,这是不可能的。

GitHub issue here . GitHub 问题在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM