You might have encountered some situations when your file
runs for very long time and it results in timeout in browser. This happens when browsers don’t get response within some
stipulated time frame. Few examples of such situations are,
- generating report that needs lot many db operations,
- reading or writing many files(I/O Operations)
- long running data base operation through CF file etc.
- A page request that has lot many back end jobs to complete. There could be many examples as such.
Here is the suggested solution for
this type of situations.
- Set big requestTimeout value in the pages that are expected to run for very long time. Remember, here the value is in milliseconds.
- In place of directly calling the files in browser, create a scheduled task in CF Admin and there you set the file URL(see highlights in second screenshot). Mention timeout value to a bigger amount to ensure successful completion of the task.
- Here, to see what output you got from the page, you need to check Publish checkbox(see highlights in second screenshot) and set a file path to write the output. Its recommended to set the output file extension to .html for better readability of output.
- Once you are done with all these setting and done with the scheduled task creation, run the scheduled task, by clicking on green icon, to run the file immediately(screenshot three).
Hope, these details will be of help. Any suggestion or
question is most welcome.
No comments:
Post a Comment