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

[VsCode] Fail to load instance history #22

Closed
junalmeida opened this issue Mar 17, 2022 · 7 comments
Closed

[VsCode] Fail to load instance history #22

junalmeida opened this issue Mar 17, 2022 · 7 comments

Comments

@junalmeida
Copy link

When trying to see an orchestration history, I get this:

image

@scale-tone
Copy link
Contributor

@junalmeida , can you please enable logging and then check the 'Durable Functions Monitor' output channel for some more detailed error messages when it happens?

image

Also, does it happen for just this single instance or for some others (and how much similar they are)?

@junalmeida
Copy link
Author

Here goes the log when the error happens. So far this happens with this single instance. Other instances of this orchestration seems to return with no problem.

[2022-03-17T20:22:56.912Z] Executing 'DfmAboutFunction' (Reason='This function was programmatically called via the host APIs.', Id=c14a5b4e-7428-4757-94b1-3907946c6079)
[2022-03-17T20:22:57.242Z] Executing 'DfmAboutFunction' (Reason='This function was programmatically called via the host APIs.', Id=ac19ca02-c406-402c-bbb8-179b387b49d6)
[2022-03-17T20:22:57.549Z] Executed 'DfmAboutFunction' (Succeeded, Id=c14a5b4e-7428-4757-94b1-3907946c6079, Duration=653ms)
[2022-03-17T20:22:57.549Z] Executed 'DfmAboutFunction' (Succeeded, Id=ac19ca02-c406-402c-bbb8-179b387b49d6, Duration=302ms)
[2022-03-17T20:22:58.146Z] Executing 'DfmGetOrchestrationsFunction' (Reason='This function was programmatically called via the host APIs.', Id=3b3f0d05-2bd2-4620-b3f0-d975a071cf38)
[2022-03-17T20:22:59.918Z] Host lock lease acquired by instance ID '0000000000000000000000001326EE58'.
[2022-03-17T20:23:01.828Z] Executing 'DfmGetIdSuggestionsFunction' (Reason='This function was programmatically called via the host APIs.', Id=72c7478b-5b82-4b53-9da6-99a7475ddee8)
[2022-03-17T20:23:01.927Z] Executed 'DfmGetIdSuggestionsFunction' (Succeeded, Id=72c7478b-5b82-4b53-9da6-99a7475ddee8, Duration=106ms)
[2022-03-17T20:23:03.421Z] Executing 'DfmGetOrchestrationFunction' (Reason='This function was programmatically called via the host APIs.', Id=44e4b7e5-e1c0-4fbe-81e8-2b97a15d59c6)
[2022-03-17T20:23:03.692Z] Executed 'DfmGetOrchestrationFunction' (Succeeded, Id=44e4b7e5-e1c0-4fbe-81e8-2b97a15d59c6, Duration=271ms)
[2022-03-17T20:23:03.853Z] Executing 'DfmGetOrchestrationHistoryFunction' (Reason='This function was programmatically called via the host APIs.', Id=8338edd3-a3e6-4a64-a650-423d21c32b27)
[2022-03-17T20:23:05.793Z] Failed to get execution history from storage, falling back to DurableClient
[2022-03-17T20:23:05.794Z] System.Private.CoreLib: An item with the same key has already been added. Key: 9.
[2022-03-17T20:23:59.965Z] Executed 'DfmGetOrchestrationsFunction' (Succeeded, Id=3b3f0d05-2bd2-4620-b3f0-d975a071cf38, Duration=61829ms)
[2022-03-17T20:23:59.997Z] Executing 'DfmGetOrchestrationsFunction' (Reason='This function was programmatically called via the host APIs.', Id=bcafdfd1-81f3-409b-80a4-4b1265af72ca)
[2022-03-17T20:24:40.124Z] DFM failed
[2022-03-17T20:24:40.124Z] Newtonsoft.Json: Index is less than 0. (Parameter 'index').
[2022-03-17T20:24:40.125Z] Executed 'DfmGetOrchestrationHistoryFunction' (Succeeded, Id=8338edd3-a3e6-4a64-a650-423d21c32b27, Duration=96273ms)

@junalmeida
Copy link
Author

Btw I have a question for you: I've noticed that the total run time for each activity on the Gantt chart is a sum of "waiting time" with "execution" time. Is there a way for you to show those timings separately?

I say that because on the servers I have a 10 minute limit, and I can see some taking 20 min. So, I suppose this is the sum of waiting time (scheduled) with actual execution time.

@scale-tone
Copy link
Contributor

@junalmeida , so the logs tell us that this particular instance's history fails to be fetched both by DfMon's custom algorithm and by DurableClient (which is used as a fallback method).

The culprit seems to be a duplicated TaskScheduledId in the execution history. I have no idea what circumstances could lead to that, but the workaround is straightforward (just committed it).
Note that this is just a hypothesis, and it is to be validated once we release the updated version (in a few days).

Regarding your question, let's discuss it separately via #23.

@junalmeida
Copy link
Author

@scale-tone Thanks for addressing this :) I'm happy to test it once available.

@scale-tone
Copy link
Contributor

Should be fixed in v5.3. Please, validate.

@junalmeida
Copy link
Author

Yes, it works. Error is gone and I can see all details, Sequence diagram and Gantt chart for this instance. Thank you for addressing this.

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