Hi Guys,


I having a timer error when the timer is running :

[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.Scheduler.Core.TimerHandler.ExecuteTimer(String ssKey, Int32 timeout, Int32 tenantId)
   at OutSystems.Scheduler.Core.TimerJob.Execute()
   at OutSystems.Scheduler.Core.SchedulerProducerConsumer`1.Execute(Job job)

[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)


This timer should run once every month, but it'll call extensive insert data to entity (+/- 1.000.000 record).

Does this happen because the database connection timeout ? or other things ?

If this because of database connection, any suggestion on fixing this on cloud environment ?


Thanks Guys

Hi Toto,

By above-mentioned errors, I had analyzed that it is happening due to the need for the upgrade.


1]The underlying connection was closed: An unexpected error occurred on a receive.

To resolve this problem, make sure that you are using the most recent version of the .NET Framework.

2]Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

If you consuming some REST API make sure it has correct URL.

3] An existing connection was forcibly closed by the remote host

Please go through link:

https://www.outsystems.com/forums/discussion/17503/cannot-consume-restful-api-on-same-app-or-server/


Hope this will help you,

Regards,

Amreen

Amreen Shaikh wrote:

Hi Toto,

By above-mentioned errors, I had analyzed that it is happening due to the need for the upgrade.


1]The underlying connection was closed: An unexpected error occurred on a receive.

To resolve this problem, make sure that you are using the most recent version of the .NET Framework.

2]Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

If you consuming some REST API make sure it has correct URL.

3] An existing connection was forcibly closed by the remote host

Please go through link:

https://www.outsystems.com/forums/discussion/17503/cannot-consume-restful-api-on-same-app-or-server/


Hope this will help you,

Regards,

Amreen

Hi Amreen,


Thanks for your response.

The number 2 and 3, we didn't call REST API, only pure server action.

Let me check the number 1.


Thanks


Toto wrote:

Amreen Shaikh wrote:

Hi Toto,

By above-mentioned errors, I had analyzed that it is happening due to the need for the upgrade.


1]The underlying connection was closed: An unexpected error occurred on a receive.

To resolve this problem, make sure that you are using the most recent version of the .NET Framework.

2]Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

If you consuming some REST API make sure it has correct URL.

3] An existing connection was forcibly closed by the remote host

Please go through link:

https://www.outsystems.com/forums/discussion/17503/cannot-consume-restful-api-on-same-app-or-server/


Hope this will help you,

Regards,

Amreen

Hi Amreen,


Thanks for your response.

The number 2 and 3, we didn't call REST API, only pure server action.

Let me check the number 1.


Thanks



Please check the link first before going to do anything.

Amreen Shaikh wrote:

Toto wrote:

Amreen Shaikh wrote:

Hi Toto,

By above-mentioned errors, I had analyzed that it is happening due to the need for the upgrade.


1]The underlying connection was closed: An unexpected error occurred on a receive.

To resolve this problem, make sure that you are using the most recent version of the .NET Framework.

2]Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

If you consuming some REST API make sure it has correct URL.

3] An existing connection was forcibly closed by the remote host

Please go through link:

https://www.outsystems.com/forums/discussion/17503/cannot-consume-restful-api-on-same-app-or-server/


Hope this will help you,

Regards,

Amreen

Hi Amreen,


Thanks for your response.

The number 2 and 3, we didn't call REST API, only pure server action.

Let me check the number 1.


Thanks



Please check the link first before going to do anything.

Hi, just like I inform before, we didn't use any REST API, I already check the link and I think this is not the case.


From what I have checked, this is cloud environment, and the cloud (using AWS) is the one that cutting the connection.

Anybody got advice on this ?


Thanks


Toto wrote:

Amreen Shaikh wrote:

Toto wrote:

Amreen Shaikh wrote:

Hi Toto,

By above-mentioned errors, I had analyzed that it is happening due to the need for the upgrade.


1]The underlying connection was closed: An unexpected error occurred on a receive.

To resolve this problem, make sure that you are using the most recent version of the .NET Framework.

2]Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

If you consuming some REST API make sure it has correct URL.

3] An existing connection was forcibly closed by the remote host

Please go through link:

https://www.outsystems.com/forums/discussion/17503/cannot-consume-restful-api-on-same-app-or-server/


Hope this will help you,

Regards,

Amreen

Hi Amreen,


Thanks for your response.

The number 2 and 3, we didn't call REST API, only pure server action.

Let me check the number 1.


Thanks



Please check the link first before going to do anything.

Hi, just like I inform before, we didn't use any REST API, I already check the link and I think this is not the case.


From what I have checked, this is cloud environment, and the cloud (using AWS) is the one that cutting the connection.

Anybody got advice on this ?


Thanks


I encountered the same problem a few days before (2018-2-25), but the problem disappeared on the next day (2018-2-26). 

Do you have any idea? 


Jasonlhy wrote:

Toto wrote:

Amreen Shaikh wrote:

Toto wrote:

Amreen Shaikh wrote:

Hi Toto,

By above-mentioned errors, I had analyzed that it is happening due to the need for the upgrade.


1]The underlying connection was closed: An unexpected error occurred on a receive.

To resolve this problem, make sure that you are using the most recent version of the .NET Framework.

2]Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

If you consuming some REST API make sure it has correct URL.

3] An existing connection was forcibly closed by the remote host

Please go through link:

https://www.outsystems.com/forums/discussion/17503/cannot-consume-restful-api-on-same-app-or-server/


Hope this will help you,

Regards,

Amreen

Hi Amreen,


Thanks for your response.

The number 2 and 3, we didn't call REST API, only pure server action.

Let me check the number 1.


Thanks



Please check the link first before going to do anything.

Hi, just like I inform before, we didn't use any REST API, I already check the link and I think this is not the case.


From what I have checked, this is cloud environment, and the cloud (using AWS) is the one that cutting the connection.

Anybody got advice on this ?


Thanks


I encountered the same problem a few days before (2018-2-25), but the problem disappeared on the next day (2018-2-26). 

Do you have any idea? 


Hi,


Yes, I already put support ticket on Outsystems support.

For my case, it because the data is too big, so support recommended to split the data into multiple process.

Maybe for your case, it shows the error only when the data is too big to process.


Thanks

Hi Toto & Jasonlhy,

Timers are run by a Windows service running independently from the Platform Server. You can read more about timers and when they run on this article. This service will call your logic via a local Web Service automatically setup by the platform. Your message seems to imply that the Application Server that is running your OutSystems apps terminated the web-service request, and not in the standard way (as that would lead to a Timeout message)... Did your web application server go through a reset/restart? Or maybe the application pool that is running your timers got recycled?

Jorge Martins wrote:

Hi Toto & Jasonlhy,

Timers are run by a Windows service running independently from the Platform Server. You can read more about timers and when they run on this article. This service will call your logic via a local Web Service automatically setup by the platform. Your message seems to imply that the Application Server that is running your OutSystems apps terminated the web-service request, and not in the standard way (as that would lead to a Timeout message)... Did your web application server go through a reset/restart? Or maybe the application pool that is running your timers got recycled?

Hi Jorge,


In my case, we use a timer to run logic to filter data from one table to another table (not using REST API, just logic on server action)

This heavy filter (many condition) and on many data (more than 1 million records).

What happen is, the timer will show the message above even after we put the timeout on timer to 120 minutes.

It'll failed after more or less 15 minutes of running.

When we open this case to support, they recommended to split the process into a few process. So we try to process 100.000 records per timer, and it working now.


Thanks

So the root cause for this is, as the data is too large to process, system time out happened which is closing the connection. Do we have any configuration files where re can increase the query time out in such cases? 

Thanks,

Saicharan