Scheduler Service: Error getting pending activities

Hi


I'm having this error to execute a Timer.

Any one already had this problem before? And what could be the reason?

The database server look like ok.

The plataform version is 10.

Error detail:

Module:Scheduler
Message:Scheduler Service: Error getting pending activities 
Environment InformationeSpaceVer: 0 (Id=0, PubId=0, CompiledWith=10.0.405.0)
RequestUrl:  (Method: )
AppDomain: Scheduler.exe
Path: C:\...\PS\
Locale:
DateFormat: yyyy-M-d
PID: 3012 ('Scheduler', Started='11/5/2019 7:58:10 PM', Priv=49Mb, Virt=615Mb)
TID: 23
Thread Name: Activities Fetcher
.NET: 4.0.30319.42000
Stack:System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TrySetMetaData(_SqlMetaDataSet metaData, Boolean moreInfo)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at OutSystems.HubEdition.DatabaseProvider.SqlServer.ExecutionService.ExecutionService.ExecuteReader(IDbCommand cmd)
   at #hFb.#CFb.ExecuteReader(String description, Boolean isApplication, Boolean transformParameters, Boolean skipLog)
   at OutSystems.HubEdition.Scheduler.DBScheduler.GetPendingActivities(Transaction trans, Int32 batch, String ip)
   at #o2c.#n2c.GetPendingActivities(Int32 batch, String myIp)
ClientConnectionId:1448d655-e13a-483b-9a2d-454fb79d77b0
Error Number:-2,State:0,Class:11

Best regards 

Tiago Vital 


Hi Tiago,

Can you explain or share what is running inside this timer?
From what I saw, timeout is taking place.


Thanks,

Eduardo Benites

Eduardo Benites wrote:

Hi Tiago,

Can you explain or share what is running inside this timer?
From what I saw, timeout is taking place.


Thanks,

Eduardo Benites

Hi Eduardo

Thanks...

We have a timer that perform some processing that depends of an external service response. 

This service sometime take a long time to give the response, but we have the timeout of the Timer and Integrations well defined to avoid the Timer still in progress for a long time.

The error is not very clear for me, it look like a platform routine problem related the Timers handle.

Best regards

Tiago Vital


Is this external service that you run inside a loop?


If so, I indicate you make this call with BPM (BPT), and within the process call you perform an automatic activity, and in a server action you add a loop performing the call of the created process Launch.


This will create an execution queue for this service and will not execute this entire call in one action.


Regards,

Eduardo Benites