Scheduler Error in timer

Scheduler Error in timer

  

we have a Timer running for every 5mins for a Server action that contains a  REST API which waits 60secs for response after that it will raise an error as operation has timed out. To handle this timed out error  we included an Exception Handler, with a call to the Server action again. 

This process is working fine up to 10mins after that Timer is giving Scheduler Error as below.




Error Detail
Id:
aghfgf9d-dfgd0b-dfdfd-9513-b73ce9f7b921
Time of Log:
2018-09-11 21:21:50
eSpace:
ABC
Tenant:
Users
User:

Session Id:

Server:
dgghvhhxbvbxcv
Module:
Scheduler
Message:
Scheduler Service: Error executing request http://127.0.0.1/ABC/_TimerHandler.asmx for Timer XYZ. Request duration = 661 secs.  [retry 4 of 3 scheduled]
Environment InformationeSpaceVer: 0 (Id=0, PubId=0, CompiledWith=10.0.828.0)
RequestUrl:  (Method: )
AppDomain: Scheduler.exe
Path: C:\...\PS\
Locale: 
DateFormat: yyyy-M-d
PID: 5612 ('Scheduler', Started='8/15/2018 6:12:47 PM', Priv=65Mb, Virt=652Mb)
TID: 14
Thread Name: Timer Processor #2
.NET\: 4.0.30319.42000
Stack:
[1] The underlying connection was closed: An unexpected error occurred on a receive.
   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at OutSystems.HubEdition.Scheduler.TimerHandler.ExecuteTimer(String ssKey, Int32 timeout, Int32 tenantId)
   at OutSystems.HubEdition.Scheduler.TimerJob.<Execute>b__21_0()
   at OutSystems.HubEdition.ServerCommon.SandboxUtils.ExecuteForSingleSandbox(String sandboxToExecute, Action action)
   at OutSystems.HubEdition.Scheduler.SchedulerProducerConsumer`1.<>c__DisplayClass25_0.<Execute>b__0()

[2] Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)

[3] An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)



Regards,

Saranya P



     

Last I saw this giving error, it was a problem within the server 'antivirus', and I only solved the problem by disabling it. 

Could you share your espace? It`s a little bit odd having a timer that run every 5 minutes, that on timeout exception, you call the timer`s action again... It`s possible that you`re overflowing the server with calls to this timer, an so it trows this exception.

@Saranya

The way you are treating the timeout (calling the same action again) sounds fishy...

What kind of process are you trying to achieve? After the REST API call what do you do?

Meanwhile I'll leave you this link with some information about timeouts. You should know about the different timeouts in the platform before troubleshooting your app.


Cheers,

João Heleno