I have integrated Github Actions with Terraform Cloud and everything was running fine until yesterday. When I commit to the repo the workflow is run, but cannot finish:
Waiting for 3 run(s) to finish before being queued... (1h24m30s elapsed)
Waiting for 3 run(s) to finish before being queued... (1h25m0s elapsed)
Waiting for 3 run(s) to finish before being queued... (1h25m30s elapsed)
This is example to show you that I've waited long enough. Everytime I run the workflow, "runs" number ascends. What could cause this?
Link to repo: https://github.com/nnikolow/learn-terraform-github-actions
Thanks in advance!
Just made it work - went to
your-org/Workspaces/your-project/Runs/your-run
through RunID in Actions tab in the repo and "released" the stuck run. I don't know why it got stuck, but now it works.
Related
I am trying to add a series of responses inside an intent handler and set a timer of 20 minutes which will trigger(at its end) a followup event.
So here is what I've tried:
agent.add(response_1);
//...
agent.add(response_n);
setTimeout(() => {
console.log("Setting follow up event")
agent.setFollowupEvent('20_MINUTES_PASSED');
}, 1200000);
Even though the log was displayed, my function execution stopped before it. I have checked the logs and I saw the message "Function execution took 26 ms, finished with status code: 200" displayed before "Setting follow up event".
I know that each function has a 3-5 sec timeout and I understand this is why the function finished its execution, but I cannot figure out how to trigger that event after those 20 minutes...
There are two issues with this idea: Cloud functions aren't meant to run for that long, you would have to use either a real server or some scheduling service for this. However, Dialogflow doesn't let you do this anyway, webhook requests time out after a few seconds. If you haven't send a response by then the agent will tell the user that your service is unavailable. You can also not initiate a new session without the users explicit request to do so, presumably because developers would quickly abuse this for spam etc. There is thus no way to trigger an event after 20 minutes.
The closest to what you are looking for are probably push notifications, but they are very limited compared to follow up events.
I am trying to diagnose this error when my timer function runs. I have not found much help on this on google search
UnscheduledInvocationReason: IsPastDue, OriginalSchedule: 2019-06-13T15:13:00.0000000-07:00
It seems like the process just stops when this error comes.
Anyone have any insight on this?
The IsPastDue flag is passed to your azure function to indicate if the timer was overdue or not. A timer function can run late in some scenarios like the app service was restarted, in this case it is still invoked but the IsPastDue flag will be set to true to give your function a chance to react.
These links are helpful
Timer trigger for Azure Functions
Also, it seems that it was an issue and it is submitted on github but that was on 2017
TimerTrigger can miss IsPastDue
Got this error locally.
[2021-06-16T14:58:22.779Z] Executing 'Functions.TimerTrigger'
(Reason='Timer fired at 2021-06-16T16:58:22.7688953+02:00',
Id=adbaee54-8a3e-4983-a7e4-a73f69153e5e) [2021-06-16T14:58:22.780Z]
Trigger Details: UnscheduledInvocationReason: IsPastDue,
OriginalSchedule: 2021-06-16T16:37:00.0000000+02:00
[2021-06-16T14:59:22.614Z] Starting worker process failed
[2021-06-16T14:59:22.615Z] The operation has timed out.
Solved by clearing Blob Emulator locally:
delete
FROM [AzureStorageEmulatorDb510].[dbo].[Blob]
I have long running web job in AppService (around 1h).
AppService has "Always on" turned on.
It is initialized with:
var host = new JobHost(config);
host.Call(typeof(Functions).GetMethod("SyncUsers"));
host.Start();
Actual methods SyncUsers wrapped with attributes:
[Timeout("00:59:00", ThrowOnTimeout = true)]
[NoAutomaticTrigger]
Schedule is set with settings file settings.job:
{
"is_singleton": true,
"schedule": "0 0 */4 * * *"
}
Main issue is that in WebJobs Dashboard I see status "Never finished" in 90% of cases (or failed with exception - OK situation). Running time for such jobs is different: from 5 min to 30 mins. Logs just stopped at some moment without any exception or detailed message.
Another thing is that I can see that multiple jobs are running in the same time. So looks like singleton and schedule don't work (since job should run every 4h).
Also some jobs that have this status, displayed without running time, like this: "1 hour ago ( running time)" and I am not able to see logs or download them.
Anybody had such experience?
Thank you
Looks like you're trying to run an executable that never ends as a triggered WebJob, which has no chance of working. You need to either:
Use a continuous WebJob and rely on the WebJobs SDK for your timer
Use a plain console app deployed as a Scheduled WebJob. No need to use the SDK here. Just do what you need to do from your Main() and let it end.
I'd suggest #2 unless you have a specific need to use the WebJobs SDK.
I have an app I want to run in Heroku (the free version) every 4 minutes from like 10am-10pm Monday-Friday. I used to do this using a cron job in Digital Ocean but I'm trying to migrate over to Heroku since it's free. But is this even possible? From everything I can see it looks like you can only run stuff every 10 minutes on Heroku.
It is a simple app that sends email updates every 4 minutes.
Thank you.
Heroku doesn't give you a way to run things every 4 minutes. As you mentioned, the lowest the Scheduler add-on will give you is 10 minutes.
You could setup a process running all the time, and enqueuing/processing your tasks every 4 minutes though.
As mentioned in garson's comment, node-cron can handle this very easily for you.
For example, the following code:
var CronJob = require('cron').CronJob;
new CronJob('* */4 * * * *', function() {
console.log('You will see this message every 4 minute');
}, null, true, 'America/Los_Angeles');
Will show the console message every 4 minutes.
You can run it with node index.js.
So if you put the following line in your Procfile with the name cron and deploy your app, you can do:
heroku ps:scale cron=1
And the process will indefinitely, executing your code every 4 minutes.
I install the openstack one key:
packstack --allinone
But get stuck in here:
Testing if puppet apply is finished: 103.xxx_controller.pp
It takes 30 minutes or more depending upon ram and cpu of machine on which you are installing packstack/devstack. Let it finish and wait it out. Error or success message will appear after it finishes.