Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Exception -> System indexOutOfRangeException every now and then #438

Open
pluim003 opened this issue Feb 8, 2022 · 4 comments

Comments

@pluim003
Copy link
Contributor

pluim003 commented Feb 8, 2022

Describe the bug
Every now and then the SQL-IMPORTER-job fails, although (most of) the data has been captured. Errormessage:

Date 8-2-2022 09:05:00
Log Job History (SQLWATCH-IMPORTER)

Step ID 1
Server WPZKH1879
Job Name SQLWATCH-IMPORTER
Step Name SQLWatch - import
Duration 00:00:01
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0

Message
Unhandled Exception: System.AggregateException: One or more errors occurred. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Collections.Generic.List1.Add(T item) at SqlWatchImport.Program.<>c__DisplayClass0_2.<Main>b__0(RemoteInstance RemoteInstance) in C:\projects\sqlwatch\SqlWatch.Monitor\Project.SqlWatchImport\Program.cs:line 154 at System.Threading.Tasks.Parallel.<>c__DisplayClass31_02.b__0(Int32 i)
at System.Threading.Tasks.Parallel.<>c__DisplayClass17_01.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IList1 list, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Action3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func1 localInit, Action1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable1 source, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Action3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func1 localInit, Action1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable1 source, Action1 body)
at SqlWatchImport.Program.Main(String[] args) in C:\projects\sqlwatch\SqlWatch.Monitor\Project.SqlWatchImport\Program.cs:line 125

Unclear which of the 30 instances to be monitored throws this...

To Reproduce
Happens randomly. Next run as it runs every 5 minutes might succeed without errors and then after a while the same error occurs.

Expected behavior
No error

Screenshots
If applicable, add screenshots to help explain your problem.

Windows Server (please complete the following information):

  • OS Version: Windows 2016

SQL Server (please complete the following information):

  • SQL Version: SQL Server 2017
  • SQL Edition: Enterprise

SQL Server Management Studio (SSMS -> about -> copy info):

  • paste "about" info here:

SQLWATCH version (from DACPAC or from sysinstances)

  • 4.3.0.x

Additional context
Add any other context about the problem here.

@marcingminski
Copy link
Owner

Hi, is this still an issue or has it been fixed since you raised the bug?

@pluim003
Copy link
Contributor Author

pluim003 commented Oct 1, 2022

Well, it's been almost 8 months since I logged the issue. About 6 months or so we switched from Sqlwatch to Zabbix. So unfortunately we don't use sqlwatch anymore and I can't tell if the same problem still is present.

@marcingminski
Copy link
Owner

Zabbix is good! I used to use it extensively and will be happy to help you with SQL templates (if you need any help!)

@pluim003
Copy link
Contributor Author

pluim003 commented Oct 1, 2022

Thanx @marcingminski , always handy, to compare with ours at the company.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants