azure-functions

Running Playwright in Azure Function

Deadly 提交于 2021-02-08 07:23:25
问题 I'm trying to run a simple Azure Function that would enter page and generate a PDF depending on what is visible in a browser. I created a NodeJS 12 Azure Function with Linux Consumption Plan (B1). I set PLAYWRIGHT_BROWSERS_PATH to 0 . Function code looks like this: const { chromium } = require("playwright-chromium"); const baseUrl = "http://someurl"; const targetPage = "/action/"; module.exports = async function (context, req) { const browser = await chromium.launch(); const page = await

Enable Sql Dependency in Application Insights on Azure Functions with EF Core

此生再无相见时 提交于 2021-02-08 06:25:15
问题 I have an Azure Function v3 application which uses Microsoft.EntityFrameworkCore 3.1.5 . I am not able to enable SQL Dependency tracking. Struggling with it 1 day already. To isolate the issue, I have created a standalone AzureFunction without EF. Instead of EF I was using Microsoft.Data.SqlClient 1.0.19269.1 which is also used by EF. Here goes the function: public static class Function1 { [FunctionName("Function1")] public static async Task<IActionResult> Run( [HttpTrigger(AuthorizationLevel

Singleton Azure function running as separate instances

谁说胖子不能爱 提交于 2021-02-07 23:01:45
问题 We have an Azure function that is supposed to be handling several service bus triggers at the same time and what I assume is happening is that it is being split across several instances which is causing some concurrency problems on our end. We need our function to act as a singleton so we can process requests one at a time without any collisions. From what we looked into in this article (https://docs.microsoft.com/en-us/azure/app-service/webjobs-sdk-how-to#singleton-attribute) we should be

CosmosDB Change Feed Scaling

喜夏-厌秋 提交于 2021-02-07 21:53:39
问题 I have my Azure function with CosmosDB trigger, that listens to a collection using lease collection mechanism. This function is hosted on consumption plan. I have noticed that under heavy load I tend to get updates to my function with a greater and greater delay. After reading documentation I did not find a way how to improve scaling of my setup. Is there a way to? 回答1: Consumption Plan instances should grow based on how far behind your Function is lagging. If you are using Consumption Plan,

How to get FFProbe to run using dotnet core as an Azure Function in Docker?

送分小仙女□ 提交于 2021-02-07 21:14:05
问题 I am trying to get video details (length, height, width, and content type) from a video based on a URL. By using the nuget package https://www.nuget.org/packages/NReco.VideoInfo.LT I was able to create an Azure Function running locally pointing to my local install of FFProbe rather easily. However, the trick is now making it compatible with an Azure Function and, to the best of my knowledge, the easiest way to do that is by providing a Docker image that contains everything needed (this would

How to get FFProbe to run using dotnet core as an Azure Function in Docker?

萝らか妹 提交于 2021-02-07 21:02:12
问题 I am trying to get video details (length, height, width, and content type) from a video based on a URL. By using the nuget package https://www.nuget.org/packages/NReco.VideoInfo.LT I was able to create an Azure Function running locally pointing to my local install of FFProbe rather easily. However, the trick is now making it compatible with an Azure Function and, to the best of my knowledge, the easiest way to do that is by providing a Docker image that contains everything needed (this would

Azure functions : Getting 403 error while accessing the storage account

五迷三道 提交于 2021-02-07 20:21:07
问题 I have been using azure timer based function in my project. Since I started using the function, I was getting error 403 related to access forbidden from Azure storage account. I tried adding AzureWebJobsStorage Key in function's configuration I tried adding outbound IPs of Allowed ip ranges of azure storage accounts I tried checking the option of allowing azure managed services to the storage account. However, I'm still getting the error in that particular timer function of my function app.

Azure functions : Getting 403 error while accessing the storage account

橙三吉。 提交于 2021-02-07 20:20:02
问题 I have been using azure timer based function in my project. Since I started using the function, I was getting error 403 related to access forbidden from Azure storage account. I tried adding AzureWebJobsStorage Key in function's configuration I tried adding outbound IPs of Allowed ip ranges of azure storage accounts I tried checking the option of allowing azure managed services to the storage account. However, I'm still getting the error in that particular timer function of my function app.

Azure Function App use latest version of Key Vault Secret via Application Settings

北战南征 提交于 2021-02-07 10:50:22
问题 I have a Linux Function App running on Consumption Plan that is using a Key Vault Reference in the Application Settings to retrieve and use a secret stored in an Azure Key Vault. This works fine so far. However, we have to change that secret every day (i.e. create a new version of that secret in the Key Vault and set an activation date for that secret) and would like to have the Function App automatically retrieve and use the new version as soon as its activated without having to manually

How To Share object state across all Azure Function Instances

为君一笑 提交于 2021-02-07 10:34:20
问题 We have a C# Azure Function App (consumption plan) which scales dynamically i.e new instances are added depending on the load, now we have an object which needs to be used across all instances of this Azure Function, as the object is complex (has delegates) I cannot serialize to put on an external cache so that all instances can access it from there, please suggest the best way to handle this scenario. 回答1: Azure Function instances are running on different servers, they do not share the same