After looking deep into this situation, I have figured that client's proxy is timing out and I have no control over it. The only thing I can do is to change the logic of client requesting and downloding a file.
Server creates a temporary file on server side, and create an http path such as
http:\www.mydomain.com\temp\download\files\12342323.pdf
I havn't much read about this, but Is it possible to create socket connection via node.js and transfer the file?
In solution 1 is top of my head, without any coffee from last 4 hours. The only thing I am stuck as in knowledge is. How am I going to detect that file is done on server side and now my ajax script can enable the link, or download it.
Please throw some new idea to handle this situation. NO DIRECT ANSWER REQUIRED. I rather know which equipment to use for fishing, then getting a fish readymade. :) Cheers.
FYI : I have php and javascript as a tool to use at the moment.
If the file always gets created eventually, and the problem is on the client side, you could do the following:
Then you could setup a cron job or something like that to delete the files that have already been downloaded.
Add the criteria to generate the file to a queue, then redirect user to another page. Then have a process running every minute or so that reads from the queue and generates the file. Once the file is created email the link to the user.
We`ve done it with timeout request, because we didn't need a whole push server. So how it works.
You creating a link and a checker link. Then you starting to sending requests to checker link, that gives you a state of file. For me 10 second was enough. On server side you creating a queue and when it`s done it writes the flag, where you checker url says about success geeration and gives client a url redirect to file. That's it.
If your time limit is small and you want to say client that file ready as faster as possible you can create a socket connection. And than just push request to client.