General Technical Discussions for Service

Get Involved. Join the Conversation.


    Mike Waldron
    157s Time Limit on Async Custom Process?
    Topic posted February 9, 2017 by Mike WaldronGold Medal: 3,500+ Points 
    226 Views, 7 Comments
    157s Time Limit on Async Custom Process?

    I have a custom process that too-often throws this error:

    File: dquery/spmerrorshandler.cpp
            Line: 252
          In Fcn: SPMErrorsHandler::insert_stats
     Description: Object Event Handler CIMS_Auto_Contact failed while processing an Incident object with ID 2531:
    Limit Exceeded: Maximum Runtime: 157.000000s

    This is an async custom process making cURL calls to an external web service. I think synchronous custom processes have a 5s timeout, but I thought the runtime for async custom processes was unbounded. Have I misunderstood? Is this timeout value configurable? It appears the web service I'm talking to is slowish, and I've seen this myself in SoapUI.



    • Barrilito van Dijk

      Hi Mike,


      The sync cpm indeed is limited to 5 seconds. But as you are doing a curl call async would be the right choice to make here.

      It will certainly not be unbounded as time is concerned, and I guess the way the external web service behaves or limits time will be of influence too.

      I don't know how long an attempt of the cpm may take, but I do know in async it will be tried several times when an error occurs, to be precise it will retry four times:

      In case of error, rescheduled to execute at a later time.
      First: +90 seconds
      second: +450 seconds
      Thrird: + 3150 seconds
      Fourth: + 34650 seconds
      And then give up

      So, none of the numbers will add up to 157.00000s. 

      Perhaps try to break down the cpm to simple steps and start at basic. Run the cpm and let it not do anything and see if it runs, then add all your custom code in it one by one and see where it breaks.


    • Mike Waldron

      It turns out the over-long runtime was a symptom of a different problem, and something of a red herring. My custom process was executing at times when it should not have been, and I think this was somehow causing an infinite loop. I didn't have any luck proving that, but restricting custom process execution to "only when I have a valid account number" fixed the problem.

    • Barrilito van Dijk

      Hi Mike,

      Good to hear your CPM was actually working!

      As your question has solved itself, could you please set a "best answer" to an answer to close of this post. As there is no answer that solved the issue, perhaps set a best answer to your own answer. It is a good practice to close of the questions, as it shows other community members that this question has an answer, and for the ones that try to help they can see straight away that they don't have to help out here with this question anymore.

      Thanks for getting back to us Mike!


    • Mike Waldron

      Well, my fundamental question is still kind of hanging out there - is this limit configurable? Even if it required an SR to Customer Care to get it configured, that would be valuable information to know.

    • Barrilito van Dijk

      Hi Mike,

      I would not know that, perhaps raise a SR with that specific question to Oracle.


    • Andrew M


      Asynchronous execution of an Object Event Handler has a time limit of 157 seconds of processing time.

    • Barrilito van Dijk

      Hi Andrew,

      Great update.  I knew about the execution being queued several times as I explained in this thread but could not find out about the 157 seconds. Great, that makes sense.

      Thanks for the update!