Skip to main content
June 8, 2009
Question

Requests not timing out even though set to at 30 sec. in cfadmin

  • June 8, 2009
  • 2 replies
  • 1085 views

We have an issue that occurs randomly every other day or so.  Our site will stall for 2-3 minutes and then come back up.  When this happens it appears that requests aren't timing out even though they are set to at 30 sec in cfadmin.  In the server.log, I can see warnings where cf realizes the threads aren't timing out, "completed in 362 seconds, exceeding the 30 second warning limit."  The pages being called when this happens seem to be at random so I can't narrow it down to a certain file or query in the code.

We have a multiserver setup with a load balancer handling the traffic between 3 identical cf servers.  There is one MS-SQL server that the 3 application servers point to.  When the problem occurs, it seems to cascade from one cf server to the next until all 3 are down.  This leads me to believe that it's some kind of DB issue, but our DBA says he can't find anything wrong.

    This topic has been closed for replies.

    2 replies

    June 12, 2009

    We figured out what was causing our issues.  We have client variables set to be stored in a database.  It appears that the purge from CF isn't always working and the tables are getting quite large (6 million records in CGLOBAL)  Purge just runs a delete SQL statement on the database, which in this case takes about 15 minutes during which the client variables are all locked.  Furthermore, when CF created the tables it didn't put any indexes on the tables.

    To resolve this, our DBA set up clustered indexes on CDATA and CGLOBAL.  Then he set up a job in SQL to manually delete the records on a schedule.  See this article for further info.  It was invaluable for getting us on the right track.  For now, we've set the purge interval in cfadmin to 168 hours (once a week) until Adobe can tell us how to disable it.  I was on the phone with an Adobe tech yesterday and they couldn't tell me how to do it.

    According to this article you definitely don't want to set the purge interval to 0 or it will purge every millisecond.  I really hope Adobe fixes this in CF9.  The interface in cfadmin is terrible.  There's no option to turn it off.  Nor can you schedule it for a certain time of the day.  All you can do is set the interval between purges.  A zero purge interval causes CF to purge every millisecond.  Setting the time to once a month causes the purge interval to reset to 1 hour, 7 minutes.  (Only way I found out about that was to catch it in the logs.)  Nor do you get alerted if the purge fails.  I found no mention of it in the logs.

    June 15, 2009

    I seem to remember reading somewhere on the old Macromedia site that client variables were not recommended (due to the overhead on every page hit).  There are other ways of persisting scopes - including session if required - that use smarter methods of update (only on change of data, every 5 minutes etc.) - xfwddx is useful for this.

    Maybe consider one of those?

    Participating Frequently
    June 8, 2009

    As far as I know CF does not kill a request if he's waiting for an

    external resource (CFHTTP, CFFTP, CFQUERY). It might very well be that

    the DB server has a lock on a table or database and CF waits for the

    lock to clear. You can do a stack trace dump while the CF server is

    stalling to see exactly what CF is blocking on.

    Mack

    June 8, 2009

    That's what I was afraid of.  Is there any way to auto trigger the stack trace dump when the site stalls?  By the time I get notified that the site is down, it's come back up

    Participating Frequently
    June 9, 2009

    In CF8 you can setup an Alert on timeouts from the Server Monitor in

    CF Administrator and dump a stack trace when a timeout occurs.

    Mack