【发布时间】:2016-08-20 10:16:49
【问题描述】:
我有一个 xquery 文件,它返回超过 2.2GB 的文本数据。当我直接在浏览器(Chrome)中点击 xquery 文件时,它会加载所有文本数据。
但是当我尝试使用 xdmp:http-post($url,$options) 对该 xquery 文件进行后调用时,它会引发 XDMP-TOOBIG 错误。下面是痕迹。
XDMP-TOOBIG: xdmp:http-post("http://server:8278/services/getText...", <options xmlns="xdmp:http"><timeout>600000</timeout><authentication method="basic"><usernam...</options>) -- Document size exceeds text document size limit of 2048 megabytes
in /services/invoke.xqy, at 20:7 [1.0-ml]
$HTTP_CALL = <configurations xmlns:config="" xmlns=""><credentails><username>admin</username><password>admin</password...</configurations>
$userName = text{"admin"}
$password = text{"admin"}
$timeOut = text{"600000"}
$url = "http://server:8278/services/getText..."
$responseType = "text/plain"
$options = <options xmlns="xdmp:http"><timeout>600000</timeout><authentication method="basic"><usernam...</options>
$response = xdmp:http-post("http://server:8278/services/getText...", <options xmlns="xdmp:http"><timeout>600000</timeout><authentication method="basic"><usernam...</options>)
$set-reponse-type = ()
我可以在我使用 xdmp:http-post 或任何其他解决方案的文件中指定任何限制吗?
感谢您的帮助。
【问题讨论】:
-
如错误消息所示,您不能拥有大于 2048MB 的文本文档。也许,如果您更多地解释您要完成的工作,而不是您的特定实施,那么有人可以提出一个可行的替代方案。
-
以前我们使用一个 URL “server:8278/services/getText.xqy(Mocked)”返回响应类型为 text/plain 的文本数据。这将返回超过 2 GB。但是现在这段代码被移动到我们无法访问端口 8278 的 aws 集群。但是我们可以从一个可以访问 aws 的端口对该端口进行 http 调用。在 invoke.xqy 中,我使用了 xdmp:http-post() 函数,这意味着 invoke.xqy 就像代理一样。这适用于有限的数据,如果返回超过 2GB,则会发生 TOOBIG 错误。有什么解决办法吗?
标签: marklogic marklogic-7