How to check if timer is working fine

Hi Team

Can you please help in suggesting in how to check if the timer is working fine and working on the records.

In our application there is a timer which fetches the list of records using aggregate GetExpenses and then changes the status from like "Awaiting" to "Approved".It runs daily but when I last checked(on Friday(9th of Aug,2019)) the number of records in the result of aggregate was same as today .Why the timer is not picking up the records?Is there any way to check what might go wrong?When  I check the duration of the timer its generally 0s,1s,2s.

Hi Divya, 

First thing is to check the Error log in Service center to see if the timer failed and in that case, inspect the error details to find a cause. 

It is very common to a timer to timeout, for example, if the number of records to proceeds starts increasing. 

Any other error that may rise during the processing, be it due to data problems or database problems (connection, race conditions, etc) can also cause exceptions that usually will roll back any processed data. 

Knowing what happened can help you understand what measures must be taken. 

Cheers 

No error is coming when checking the result in Timer Errors. The timer shows that it ran OK.

So it runs ok.

I'm assuming the timer is not disabled.

Now you can put a breakpoint in the timer action, and force the run, to see if it is really running properly (like, if there is something in the data that is not causing an error, but is preventing the processing of the records).

Cheers.

Hi Divya,

You can debug your Timer if you're still developing it, but if you've already reached a production environment, consider using the LogMessage System action to log how many records you're picking up and how many records you're processing.


Can you explain or paste the exact Error message, so I can give you the respective solution for it.

Hi Sudip,

Divya already answered to my question about possible errors:

No error is coming when checking the result in Timer Errors. The timer shows that it ran OK.

Cheers.

Eduardo Jauch wrote:

Hi Sudip,

Divya already answered to my question about possible errors:

No error is coming when checking the result in Timer Errors. The timer shows that it ran OK.

Cheers.

The breakpoint is a good option to check. Also Please check the timmer settings. Divya also please check the general log error. I hope if timmer is fine then there is some problem with the logic. I think it will help.


Sudip Dey wrote:

Eduardo Jauch wrote:

Hi Sudip,

Divya already answered to my question about possible errors:

No error is coming when checking the result in Timer Errors. The timer shows that it ran OK.

Cheers.

The breakpoint is a good option to check. Also Please check the timmer settings. Divya also please check the general log error. I hope if timmer is fine then there is some problem with the logic. I think it will help.


Yeah will try with the debug option.what settings needs to be checked for timer?Also , in the errors the below comes :-

Recovering timer  execution. It is marked as running for too long  
Timer  error. Timer duration = 84 secs: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The wait operation timed out.) [Will retry later]

But if this is the reason then the timer should not run and should throw error but no error comes and the duration of timer is 0s.And also this error comes sometimes.


Divya Sharma wrote:

Sudip Dey wrote:

Eduardo Jauch wrote:

Hi Sudip,

Divya already answered to my question about possible errors:

No error is coming when checking the result in Timer Errors. The timer shows that it ran OK.

Cheers.

The breakpoint is a good option to check. Also Please check the timmer settings. Divya also please check the general log error. I hope if timmer is fine then there is some problem with the logic. I think it will help.


Yeah will try with the debug option.what settings needs to be checked for timer?Also , in the errors the below comes :-

Recovering timer  execution. It is marked as running for too long  
Timer  error. Timer duration = 84 secs: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The wait operation timed out.) [Will retry later]

But if this is the reason then the timer should not run and should throw error but no error comes and the duration of timer is 0s.And also this error comes sometimes.


Yes, I know about this error. Please check the  SQL Server connection and I think the server is down and net connection is slow. So the timmer is rescheduling each time and couldn't able to execute properly. Also, you can able to do other things that you can make the timer schedule to 5 or 10 min gap. so it can get time to perform each request without overlapping. I think it will help you.

Thank you,

Sudip


Sudip Dey wrote:

Divya Sharma wrote:

Sudip Dey wrote:

Eduardo Jauch wrote:

Hi Sudip,

Divya already answered to my question about possible errors:

No error is coming when checking the result in Timer Errors. The timer shows that it ran OK.

Cheers.

The breakpoint is a good option to check. Also Please check the timmer settings. Divya also please check the general log error. I hope if timmer is fine then there is some problem with the logic. I think it will help.


Yeah will try with the debug option.what settings needs to be checked for timer?Also , in the errors the below comes :-

Recovering timer  execution. It is marked as running for too long  
Timer  error. Timer duration = 84 secs: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The wait operation timed out.) [Will retry later]

But if this is the reason then the timer should not run and should throw error but no error comes and the duration of timer is 0s.And also this error comes sometimes.


Yes, I know about this error. Please check the  SQL Server connection and I think the server is down and net connection is slow. So the timmer is rescheduling each time and couldn't able to execute properly. Also, you can able to do other things that you can make the timer schedule to 5 or 10 min gap. so it can get time to perform each request without overlapping. I think it will help you.

Thank you,

Sudip


Hi 

but the final result shows that the timer ran ok.It  does not throw any error when the logs are checked under Monitoring->Timer.The duration shows 0s sometimes 1s.


Divya Sharma wrote:

Sudip Dey wrote:

Divya Sharma wrote:

Sudip Dey wrote:

Eduardo Jauch wrote:

Hi Sudip,

Divya already answered to my question about possible errors:

No error is coming when checking the result in Timer Errors. The timer shows that it ran OK.

Cheers.

The breakpoint is a good option to check. Also Please check the timmer settings. Divya also please check the general log error. I hope if timmer is fine then there is some problem with the logic. I think it will help.


Yeah will try with the debug option.what settings needs to be checked for timer?Also , in the errors the below comes :-

Recovering timer  execution. It is marked as running for too long  
Timer  error. Timer duration = 84 secs: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The wait operation timed out.) [Will retry later]

But if this is the reason then the timer should not run and should throw error but no error comes and the duration of timer is 0s.And also this error comes sometimes.


Yes, I know about this error. Please check the  SQL Server connection and I think the server is down and net connection is slow. So the timmer is rescheduling each time and couldn't able to execute properly. Also, you can able to do other things that you can make the timer schedule to 5 or 10 min gap. so it can get time to perform each request without overlapping. I think it will help you.

Thank you,

Sudip


Hi 

but the final result shows that the timer ran ok.It  does not throw any error when the logs are checked under Monitoring->Timer.The duration shows 0s sometimes 1s.



Do you mind sharing q picture of the logic timer is executing? There might be something which is just ignoring the error and going ahead !


Divya Sharma wrote:

Sudip Dey wrote:

Divya Sharma wrote:

Sudip Dey wrote:

Eduardo Jauch wrote:

Hi Sudip,

Divya already answered to my question about possible errors:

No error is coming when checking the result in Timer Errors. The timer shows that it ran OK.

Cheers.

The breakpoint is a good option to check. Also Please check the timmer settings. Divya also please check the general log error. I hope if timmer is fine then there is some problem with the logic. I think it will help.


Yeah will try with the debug option.what settings needs to be checked for timer?Also , in the errors the below comes :-

Recovering timer  execution. It is marked as running for too long  
Timer  error. Timer duration = 84 secs: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The wait operation timed out.) [Will retry later]

But if this is the reason then the timer should not run and should throw error but no error comes and the duration of timer is 0s.And also this error comes sometimes.


Yes, I know about this error. Please check the  SQL Server connection and I think the server is down and net connection is slow. So the timmer is rescheduling each time and couldn't able to execute properly. Also, you can able to do other things that you can make the timer schedule to 5 or 10 min gap. so it can get time to perform each request without overlapping. I think it will help you.

Thank you,

Sudip


Hi 

but the final result shows that the timer ran ok.It  does not throw any error when the logs are checked under Monitoring->Timer.The duration shows 0s sometimes 1s.


As the error is not interrupting the code to stop the work. It throws an exception and let the code work without taking the data for the required operation. I think the codes need to verify once again. As I confirm the issues is on the action which performing for that Timmer schedule. Please check the code once again.

Thank you,

Sudip   

Hi guys, 

I'll ask you to avoid 'reply to' without removing unnecessary parts of the message (those you're not addressing directly), as it turns reading your comments very hard... 

:) 

Divya, 

In the end, you do have an error when executing the timer. 

The message is clear. The code tried to reach a database and couldn't. You need to investigate this. 

Regarding why the timer log does not show an error message, could you show a screenshot of error log and timer log?

If the timer is timing out, it indeed started. The error happened later during execution. 

Cheers.