Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 778261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:44:12+00:00 2026-05-14T19:44:12+00:00

I have a scheduled task that runs once a day that builds an XML

  • 0

I have a scheduled task that runs once a day that builds an XML file that I pass off to another group. Recently the amount of data has greatly increased and is now causing the task to time out (I think). I have tried to optimize my script as much as possible but with no luck. It times out long before an hour and I don’t get any kind of ColdFusion error. Instead I get a “This page cannot be found” after it runs.

  • Could this be a timeout someplace other than Coldfusion?
  • Is there a more efficient way to build this XML file?

file:

<cfsetting requesttimeout="7200">
<cftry>
    <cfquery datasource="datasource" name="getPeople">
        select PersonID, FirstName, LastName
        from People
    </cfquery>
    <cfquery datasource="datasource" name="getDepartments">
        select d.DepartmentID, DepartmentName, pd.PersonID
        from Department d inner join PersonDepartment pd on d.DepartmentID = pd.DepartmentID
    </cfquery>
    <cfquery datasource="datasource" name="getPapers">
        select PaperID, PaperTitle, PaperDescription, pp.PersonID
        from Paper p inner join PersonPaper pp on p.PaperID = pp.PaperID
    </cfquery>
<cfsavecontent variable="theXML"><?xml version="1.0" encoding="utf-8" ?><people>
<cfoutput query="getPeople"><cfsilent>
        <cfquery dbtype="query" name="getPersonDepartments">
        select DepartmentID, DepartmentName
        from getDepartments
        where PersonID = #getPeople.PersonID#
        </cfquery>
        <cfquery dbtype="query" name="getPersonPapers">
        select PaperID, PaperDescription
        from getpapers
        where PersonID = #getPeople.PersonID#
        </cfquery>
        </cfsilent> <person>
        <person_id>
            #getPeople.PersonID#
        </faculty_id>
        <person_first_name>
            #getPeople.Firstname#
        </person_first_name>
        <person_last_name>
            #getPeople.LastName#
        </person_last_name><cfif getPersonDepartments.recordcount gt 0>
        <departments><cfloop query="getPersonDepartments">
            <department>
                <department_id>
                    #getPersonDepartments.DepartmentID#
                </department_id>
                <department_name>
                    #getPersonDepartments.DepartmentName#
                </department_name>
            </department></cfloop>
        </departments></cfif><cfif getPersonPapers.recordcount gt 0>
        <papers><cfloop query="getPersonPapers">
            <paper>
                <paper_id>
                    #getPersonPapers.PaperID#
                </paper_id>
                <paper_description>
                    #getPersonPapers.PaperDescription#
                </paper_description>
            </paper></cfloop>
        </papers></cfif>
    </person>
</cfoutput></faculty>
</cfsavecontent>
<!--- Generate the file that contains the RSS --->
<cffile action="write" file="#application.serverroot#/People.xml" output="#theXml#" nameconflict="overwrite">
<cfcatch>
<cfdump var="#cfcatch#">
</cfcatch>
</cftry>
Done!
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T19:44:13+00:00Added an answer on May 14, 2026 at 7:44 pm

    To me, it sounds like problem with memory. Could happen that your page fills up whole heap space dedicated to Coldfusion and then “lives” in couple of megabytes which are cleaned with garbage collector until timeuot.
    I worked with 1GB+ XML files so I had real nightmare until I figured out everything.

    So what you can do?

    1. Make sure that debugging is turned of.

    2. Check the logs

    3. Open CF Admin’s Monitor tool and see what happens when you run this.
      (If you can’t see monitor, use task manager and see if jrun takes same amount of memory like set in cfadmin)

    4. You could also make rough estimation how big is your xml, e.g. number of rows by average number of characters in that XML node. And if it’s too large this could help you figure out.

    Checkout Charlie Arehart’s list of tools which could help you with this and other issues http://www.carehart.org/cf411/

    There are other ways to build XML which could save memory and/or processing time. But let’s first figure out where’s the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a backroundrb scheduled task that takes quite a long time to run.
I have a console application that will be kicked off with a scheduler. If
I have code where I schedule a task using java.util.Timer . I was looking
I have a .Net console App which using a scheduled event will start, call
I have been tasked with creating a program that will generate an amortization schedule.
I have a table which holds flight schedule data. Every schedule have an effective_from
I have a Stored procedure which schedules a job. This Job takes a lot
Have just started using Google Chrome , and noticed in parts of our site,
Have you ever seen any of there error messages? -- SQL Server 2000 Could
Have you guys had any experiences (positive or negative) by placing your source code/solution

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.