[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 593
  • Last Modified:

What is cause of cfhttp, cfmail, cfdocument all timing out and failing

This morning my web server behaved a little strangely.  One cfhttp timed out (The request has exceeded the allowable time limit) and then a cfdocument page didn't complete (The document has no pages.), then a mailing process timed out as well using cfmail (The request has exceeded the allowable time limit).

It seemed to get worse and worse (judging by my logs) and I didn't know what to do, so I rebooted and that seemed to fix everything and it's been running fine since.  All these different processes run fine all the time and I don't think I've seen this before.

I'm on CFMX 7.02.

I don't like things happening and not knowing the reason behind it - does anybody know why this occurred and how to prevent it in future?
  • 2
1 Solution
are all these timing-out processes related and depend on one another (i.e. they are all parts of a larger process) or are they totally independent and separate processes?

if they are all parts of one process (i.e. get some content using cfhttp -> use that content in cfdocument -> email the generated pdf) - then even one of them timing out will cause all the others to time out.

cfhhtp can easily time out if the requested url is not available/unresponsive due to network congestion or some maintenance work on the other server...  

you can use cftry/cfcatch around vulnerable code blocks to prevent errors/timeouts from propagating to other (dependent) processes...

hc1619Author Commented:
They are all independent of each other, separate websites in some cases.
well, there are numerous reasons why this could happen... without diving deep into cf logs it is impossible to tell exactly why it happened, i am afraid.

if it your own server or are you on a shared hosting?
are you on standard or enterprise cf?
do you have access to cf admin and cf/jrun logs on the server?

is it the first time you saw processes timing out or is it a regular thing?

unless it is your own dedicated/vps server, it will be pretty much impossible for you to troubleshoot this and find out the reasons... short of trying to raise the issue with the hosting company and see if they are willing to investigate this (but they will likely tell you it is your code at fault)...

since you say these are un-related processes, it may be that your server was bogged down with some long-running/infinite request, hogging all available threads... again, this can be for numerous reasons (cf- or db- or os-related), and on a shared hosting this may not even be the fault of your application, but someone else's on the same server...

getting all the logs from the server (cf, jrun and os logs, and db logs too) will be the first thing to do in any case.



Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now