21

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

CITBL
  • 1,587
  • 3
  • 21
  • 36
  • 1
    You might find http://www.checkupdown.com/status/E408.html useful. – Dominic Rodger Nov 03 '09 at 14:41
  • thanks, I've already read this info. But it didnt help me yo understand what happening. No problem with the internet connection, but the problem is still present – CITBL Nov 03 '09 at 14:44
  • Without knowing what host software GoDaddy is using for your site, and how it is configured, it'll be pretty hard to determine what is happening. My suggestion would be to open a support request with GoDaddy directly. – Scott Markwell Jun 22 '10 at 16:57

1 Answers1

27

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.

DK2
  • 502
  • 7
  • 5
  • 1
    Thanks much. Sending the data with GET instead of POST fixed this issue for me. – Mel Stanley Mar 02 '13 at 21:38
  • How do one make a dummy GET request? – Yster Feb 04 '15 at 14:35
  • 3
    It sounds like all POSTs and no GETs for thirty minutes looks suspicious to some traffic monitoring agent that is intervening by resetting the connections. There are products that send forged resets to both ends if they think the traffic is malicious. This then drops the connection causing a timeout. – ClearCrescendo Aug 11 '15 at 16:55
  • Thought I'd comment for the sake of verification - we have a site hosted on MediaTemple, but largely cached (and served) from S3/Cloudfront. After periods of inactivity, POST requests (e.g. from the contact form) are returning 408 errors. I've added a dummy GET request to "wake up" the other end and it seems to have improved things - so another vote from me for this solution (knock on the door with a GET request first). – Richard Walker Oct 20 '15 at 10:34
  • It sounds to me that, at least in some cases, these issues may also be the result of session timeouts. It could be that session refreshes are being performed for GET requests but not POST requests, which would explain the 'waking up' behaviour. That is, on receipt of the GET request, the server is resetting the session timeout for the current session, or else setting a fresh session token in the user agent's cookie store. Has anybody experiencing the problem observed the headers coming and going in the POST and GET requests to see what session tokens are passed around? – John Rix Feb 23 '16 at 14:18