general blazor/telerik ?

1 Answer 77 Views
General Discussions
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
Deasun asked on 17 Nov 2022, 06:47 PM

I have a SP I call that takes 1 or 2 minutes to run.

I am running into the error:

system threading taskcanceledexception a task was canceled

atm the SP takes 1:08 to run.

At 35 seconds, using filters to get less data back, it runs fine!

We have many reports that take a bit to run.

How to I get this task thing to stop killing my app.

 

Timothy J
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 17 Nov 2022, 06:56 PM

The task is cancelled from where?  The browser?
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
commented on 17 Nov 2022, 07:57 PM

Browser.

It says something has happened, reload.

Doing the Inspection thing I see a System.Threading.Tasks.TaskCanceledException

as the first error.

Appears to be timing out somewhere.

I know the data from the SQL server is back from stepping thru the code.

 

Timothy J
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 17 Nov 2022, 08:00 PM

I would check the timeout on the httpclient, the browser, etc.  Have you verified using Fiddler?
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
commented on 17 Nov 2022, 08:15 PM

It appears I was calling the routine incorrectly!

What I had:

await getData_ProdResultRtp3(strWhoIAm);

What now seems to work:

await Task.Run(() => DoLongSyncOperation());

Not sure what the difference is between those two?

I assume, I know! :(, the 2nd one force it to wait till that routine is done?

Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
commented on 17 Nov 2022, 08:18 PM

sorry:

 await Task.Run(() => getData_ProdResultRtp3(strWhoIAm));

for the 2nd cmd.

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
answered on 13 Jan 2023, 03:45 PM

This fixed it:

await Task.Run(() => getData_ProdResultRtp3(strWhoIAm));

 

Tags
General Discussions
Asked by
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
Answers by
Deasun
Top achievements
Rank 3
Bronze
Bronze
Bronze
Share this question
or