HTTP,408请求超时 [英] HTTP, 408 Request timeout

查看:1727
本文介绍了HTTP,408请求超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用C ++编写的应用程序。
此应用程序使用HTTP POST请求将特定信息发送到位于远程网站上的脚本。该应用程序发送的请求的持续时间从几秒到几分钟。

I have an application, written in C++. This app dispatches a certain info to a script located on a remote website using HTTP POST requests. The app sends requests with a period from several seconds to several minutes.

问题是,经过大约半小时的工作没有错误,应用程序开始获得408 Web服务器请求超时错误。然后应用程序开始重试发布,但服务器继续响应408请求超时。

The problem is that after about a half an hour of working without errors, the app starts to get a 408 Request timeout error from the web server. Then the app starts to retry posting but the server keeps on responding with 408 Request timeout.

一个有趣的观察:我使用浏览器访问网站后错误消失了应用程序工作正常,大约30分钟后,然后问题又回来了。

An interesting observation: the error disappears after I access the website using a browser and the app works OK for about 30 minutes after that, then the issue comes back.

可能是什么原因,是否有解决方法?

What could be the reason and is there any workaround to this?

PS:该应用程序适用于使用XP Workstation的普通PC。该网站位于GoDaddy网络服务器上。

PS: the app works on a usual PC with XP Workstation. The website is on GoDaddy web server.

提前感谢

推荐答案

我知道这是一个老帖子,但认为这可能对某人有帮助,因为这个问题会让我感到沮丧。

I know this is an old post but thought this might help someone since this problem cause me hours of frustration.

我遇到了与GoDaddy网络服务器相同的问题。我的Android应用程序将POST请求发送到服务器并按预期工作但我在30分钟左右后开始遇到408请求超时错误。我还注意到,如果我打开浏览器并从PC或Android设备打开我的主页(PHP Wordpress网站),问题就消失了。该网站正在测试中,因此网络流量很小,我能够相当轻松地在服务器日志中确认这种行为。

I was experiencing the same issue with a GoDaddy webserver. My Android app sent POST requests to the server and would work as expected but I started experiencing 408 Request timeout errors after 30 mins or so. I also noticed that the problem went away if I opened up a browser and opened my home page (PHP Wordpress site) from a PC or the Android device. The website was in test so web traffic was minimal and I was able to confirm this behaviour in the server logs fairly easily.

我记录了对GoDaddy的支持电话,但他们的工作人员反应灵敏,乐于助人,他们没有提供任何有用的信息来解释这种行为。

I logged a support call to GoDaddy but whilst their staff were responsive and helpful, they did not provide any useful information to explain the behaviour.

然而,我能够通过简单地执行虚拟GET请求来解决这个问题我的POST请求,这'唤醒'了Web服务器,它响应了所有后续的POST请求。

I was however able to work around the issue by simply executing a dummy GET request before my POST request and this 'woke up' the web server and it responded to all subsequent POST requests.

这篇关于HTTP,408请求超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆