Giter Site home page Giter Site logo

Comments (8)

cgillum avatar cgillum commented on August 17, 2024 2

@hanvyj

Would running the app (locally) on two different machines pointing at the same storage cause these issues?

Yes, it definitely will. Both the local app and the Azure-deployed app will be competing for the same messages.

I understand that it can be a pain to manage the task hub names. It was a poor design choice to default to a static name and I regret it quite a bit. One thing you can try to reduce the pain is to use unique app settings/environment variable to assign the names rather than hard-coding it into host.json. That might be easier to maintain since you don't actually have to change your function app contents. Details and an example of how to do this can be found here: https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-task-hubs#hostjson-functions-2x-1

host.json

{
  "version": "2.0",
  "extensions": {
    "durableTask": {
      "HubName": "%MyTaskHub%"
    }
  }
}

local.settings.json (for local development - for production use app settings / environment variables):

{
  "IsEncrypted": false,
  "Values": {
    "MyTaskHub" : "samplehubname"
  }
}

from azure-functions-durable-js.

hanvyj avatar hanvyj commented on August 17, 2024

I renamed the function "my-function-name2" and it worked for a while, but now again it's started not running the actual function. The orchestrator runs, but I never get any console output from the "my-function-name2" function - it just returns with some old value.

from azure-functions-durable-js.

kashimiz avatar kashimiz commented on August 17, 2024

That's an interesting situation; I'm sorry you're experiencing these issues. Can you provide some more information about your system?

  • the installed version of the durable-functions npm package
  • the installed version of the Microsoft.Azure.WebJobs.Extensions.DurableTask extension (see extensions.csproj
  • the version of TypeScript you're using

I'm also curious what a problematic orchestration's history table entries look like; seeing that would help isolate the problem.

@cgillum Have you encountered any cases like this in .NET Durable Functions?

from azure-functions-durable-js.

hanvyj avatar hanvyj commented on August 17, 2024

That's an interesting situation; I'm sorry you're experiencing these issues. Can you provide some more information about your system?

  • the installed version of the durable-functions npm package
  • the installed version of the Microsoft.Azure.WebJobs.Extensions.DurableTask extension (see extensions.csproj
  • the version of TypeScript you're using

I'm also curious what a problematic orchestration's history table entries look like; seeing that would help isolate the problem.

@cgillum Have you encountered any cases like this in .NET Durable Functions?

This was with version durable-functions 1.0.0 DurableTask version=1.6.2. Typescript version 3.1.6.

I updated yesterday, to see if that fixed it, the latest version (1.1.2 and 1.7.0) and I haven't seen it returning old data. Instead (with about the same frequendcy) it seems instead to get stuck in the "Pending" state indefinately, and never starts the function:

PartitionKey Timestamp ExecutionId Input Name RuntimeStatus Version Output
101cf860-fe46-11e8-8c77-4391fac92b0c 2018-12-12T19:42:31.792Z 47a5d7039c3d4a54a9ae57be4052788e {"testFunction":"my-function-name","testInput":{...} test-orchestrator Completed {…}
b5f861c0-fe46-11e8-bae0-fd52697ababf 2018-12-12T19:47:09.341Z {"testFunction":"my-function-name","testInput":{...} test-orchestrator Pending
2350ef80-fe47-11e8-a539-b32d7e0e26cd 2018-12-12T19:50:13.637Z 2cb3c181908f40df98fa616865627785 {"testFunction":"my-function-name","testInput":{...} test-orchestrator Completed {…}
6bfca520-fe48-11e8-ae6b-ab9a71674545 2018-12-12T19:59:24.134Z {"testFunction":"my-function-name","testInput":{...} test-orchestrator Pending
c71303e0-fe49-11e8-9c75-fb01827f4b68 2018-12-12T20:09:06.475Z {"testFunction":"my-function-name","testInput":{...} test-orchestrator Pending
2e20d9e0-fe4a-11e8-a388-6fc03dab9d8a 2018-12-12T20:12:00.233Z f9a32d9a598840779a85c485a5b7e0bc {"testFunction":"my-function-name","testInput":{...} test-orchestrator Completed {…}
4f8a51f0-feb9-11e8-9dd8-d7b7ff3d49ea 2018-12-13T09:27:32.532Z 693b99000e22485ebb61d96f018b450f {"testFunction":"my-function-name","testInput":{...} test-orchestrator Completed {…}
6133f500-feb9-11e8-9dd8-d7b7ff3d49ea 2018-12-13T09:27:59.008Z {"testFunction":"my-function-name","testInput":{...} test-orchestrator Pending

Left one running for over an hour now. Might be unrelated?

Note: This is running locally using func start, but with an actual storage account.

Going to try scrapping the storage and seeing if that fixes it. (Edit: It didn't! First function I run is stuck Pending, doesn't actually start the my-function-name).

from azure-functions-durable-js.

cgillum avatar cgillum commented on August 17, 2024

@hanvyj do you have any messages in your Azure queues?

If not, is it possible that the storage account you're using might also be in use by another function app running somewhere else? One way to rule out any conflicts with other apps is to configure a unique task hub name in your host.json, like this:

{
  "version": "2.0",
  "extensions": {
    "durableTask": {
      "HubName": "MyTaskHub123"
    }
  }
}

Also, what platform are you running on (Windows, macOS, Linux)?

from azure-functions-durable-js.

hanvyj avatar hanvyj commented on August 17, 2024

It's very possible it was running another function app, or some older version of this one. I deleted the contanier and restarted it and it seems to have resolved. If it happens again I'll try give them a task name.

But it seems to be resolved!

Just started happening again. One difference is I'm developing on a different machine. Would running the app (locally) on two different machines pointing at the same storage cause these issues?

Naming the function did fix the issue though! It'll be a pain to maintain different naming on different development machines but shouldn't be an issue in prouction.

I wonder if it might cause problems with our CI - if we're spinning up a docker container to run tests, are we going to have to give it a different name every time? Will know soon hopefully.

from azure-functions-durable-js.

hanvyj avatar hanvyj commented on August 17, 2024

That should work fine for development having things in local settings, thanks a lot!

from azure-functions-durable-js.

cgillum avatar cgillum commented on August 17, 2024

Great! I'll close this issue for now. Do let us know if you run into additional issues.

from azure-functions-durable-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.