HTTP, 408 Request timeout

北慕城南 提交于 2019-12-17 19:32:53

问题


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.

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.

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: the app works on a usual PC with XP Workstation. The website is on GoDaddy web server.

thanks in advance


回答1:


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

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.

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.

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.



来源:https://stackoverflow.com/questions/1667720/http-408-request-timeout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!