Comments (6)
@CGSK @lilyjma Did we ever get a fix or workaround for this? I am facing exactly the same issue when running Azure Function locally but with the WaitForInstanceCompleteAsync method. Seems like a fundamental issue as these methods are designed for long running processes. There has to be some easy way to configure the httpClient timeout via services collection or something. Any help would be greatly appreciated.
from durabletask-dotnet.
@lilyjma Timeout only happens if we have plenty of instances to delete which is obviously the case in our prod.
[Function("PurgeDurableFunctionsHistory")]
public async Task RunAsync([TimerTrigger("%PurgeDurableFunctionsHistory:Schedule%")] TimerInfo myTimer, [DurableClient] DurableTaskClient client, CancellationToken cancellationToken)
{
PurgeResult result = null;
if (!int.TryParse(Environment.GetEnvironmentVariable("PurgeDurableFunctionsHistoryDays"), out int deletePurgeHistoryDays))
{
deletePurgeHistoryDays = 30;
}
var orchStatus = new List<OrchestrationRuntimeStatus>
{
OrchestrationRuntimeStatus.Completed,
};
var purgeFilter = new PurgeInstancesFilter(
DateTime.SpecifyKind(DateTime.MinValue, DateTimeKind.Utc),
DateTime.SpecifyKind(DateTime.UtcNow.AddDays(deletePurgeHistoryDays * -1), DateTimeKind.Utc),
orchStatus);
result = await client.PurgeAllInstancesAsync(purgeFilter, cancellationToken).ConfigureAwait(false);
}
from durabletask-dotnet.
@CGSK - could you please provide a simple sample for reproducing this?
from durabletask-dotnet.
@CGSK - Could you try the following?
Rather than increasing the timeout, try and split purging into multiple steps, making each step small enough to succeed. For example, purge data older than 12 months, then purge data older than 11 months, eventually reaching the 30 days target. You may need to adjust the numbers. This workaround is more scalable than increasing the timeout.
from durabletask-dotnet.
@lilyjma In our case, we started a new task hub with just 7 days old data, the purge is failing with timeout. Is there any way we can configure the http or function execution timeout of the actual sidecar process? If PurgeAllInstancesAsync makes a http call from the sidecar process to purge task hub and if the host's timeout configuration is not pushed to sidecar process, this is very constraining. I wonder this sidecar http timeout is specific to DurableTaskClient.PurgeAllInstancesAsync (Grpc) implementation or this is even an issue with any custom http client calls (for ex. using System.Net.Http.HttpClient).
from durabletask-dotnet.
@lilyjma This is even happening in the latest NuGet version.
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.DurableTask" Version="1.1.4" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.DurableTask.SqlServer" Version="1.3.0" />
from durabletask-dotnet.
Related Issues (20)
- Roslyn Analyzer: System.TimeProvider
- Roslyn Analyzer: document how orchestrations are analyzed and the method probing is executed.
- The filter passed to _PurgeAllInstancesAsync(PurgeInstancesFilter filter, CancellationToken cancellation)_ on the DurableTaskClient, is not used, instead a new instance is created HOT 1
- Any documentation on how to build the project? HOT 1
- RaiseEventAsync with a given taskhubname is missing compared to in process HOT 4
- Investigate state sharing between different Roslyn analyzers
- Improve environment variable analyzer to catch dotnet configuration APIs
- Keep getting "Error connecting to subchannel." errors when running on Azure HOT 1
- EntityTrigger does not get triggered in version of Microsoft.Azure.Functions.Worker.Extensions.DurableTask 1.1.3 HOT 13
- `CleanEntityStorageAsync()` does not clean entities (likely 'transient' ones)
- Roslyn Analyzer should detect calling non-existent functions (due to name mismatch)
- Roslyn Analyzer should alert against using a non-contextual logger
- Roslyn Analyzer must report System.DateTimeOffset.Now|UtcNow HOT 1
- Include HelpLinkUri in Roslyn analyzer diagnostics
- Roslyn Analyzer could suggest input parameter binding instead of ctx.GetInput<T>()
- PurgeAllInstancesAsync - Durable SQL Provider - Deletes only 1000 instances maximum HOT 2
- [Feature] Consider Adding API to DurableTaskClient for Fetching Task Hub Metadata
- TaskOrchestrationContext WaitForExternalEvent doesn't support overload without event data
- orchestration stuck in Running when waiting on external event with event sent
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from durabletask-dotnet.