我在服务器上测试IDL代码,可以通过将相应的URL发送到Python脚本(如下所示:http://example.com/pythoncode.py?arg1=val1&arg2=val2),多次更改参数值并读取结果来访问由IDL代码通过Python脚本提供。
我使用以下方法从Mac终端运行这些测试:
time curl -s - m 900 "http:...." > output.res
这正是我想要的,除了由于某种原因,如果请求超过10分钟(可以),服务器似乎停止。例如:
real 10m0.126s
user 0m0.013s
sys 0m0.021s
output.res是:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>504 Gateway Time-out</title> </head><body> <h1>Gateway Time-out</h1>
<p>The gateway did not receive a timely response from the upstream server or application.</p> </body></html>
我首先认为这是--max-time的一个问题,但我现在设置了-m 900,它给出了相同的结果。
问题:我是否在卷曲时做错了什么,或者在服务器端看起来有什么问题?
答案 0 :(得分:0)
curl&#39; -m
选项设置了它花费的最长时间。如果它提前停止,那是因为其他原因。退出代码也会显示它是否因为自己的超时而退出。
在这种情况下,你甚至得到一个友好的消息输出,表明问题确实是另一端:&#34; The gateway did not receive a timely response from the upstream server
&#34;