I have an application, written in C++
This app dispatches a certan info to a script located on a remote
website using HTTP POST requests. The app send requests with a period
from several seconds to several minutes. To send request it uses
WinHTTP API.
The problem is that after about a half an hour of working without
errors, the app starts to get 408 Request timout error from the web
server. Then the app starts to retry posting but the server keeps on
responding with 408 Request timout.
An integeresting observation: the error disappears after I access a
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 for this?
PS: the app works on usual PC with XP workstation. The website is on
GoDaddy webserver.
thanks in advance
Depending what kind of script you´re running on the server, I´d say
there is either a cookie or a session expiring, or the server doesn´t
close the connection properly, meaning it piles up connections until
it exceeds the limit.
Accessing the server through a browser might then reset the cookie, or
close existing connections, so you can start over, until it expires
again.
thanks