Script Jobs stuck on "Canceling"

I’m still fighting this and tried something a bit different. Instead of creating a standard (code) app service, I created a container app service. I can pull the image directly from Docker Hub and store the files in an Azure File Share and I have none of the issues we’ve been encountering with standard Azure Web Apps.

I actually wrote up some docs on how to configure that: Azure - PowerShell Universal

I really like this method because then there isn’t a need to setup deployment of the application bits and you can just setup deployment of the configuration files to the file share.

That said, there is a caveat. Windows Containers do not support a Basic tier and their Production tier is super expensive.

Linux Container App Services do support Basic Dev \ Test tiers and are free or very cheap.

image

They also offer more reasonable Production tiers for Linux.

So if your scripts can run on Linux (or in the Integrated mode), then this may be an option. You could also run Windows Containers if you have deep pockets.

I’m still working on figuring out what’s happening with the storage on Standard App Services. They do not support path mappings to file shares like containers do.

1 Like

I’ve actually updated this instance as a demo for PSU. Let’s give it a real-world test by having it on the public internet :wink:

1 Like

I did see on the “unautthorized” LiteDB GitHub issue there was a commit that was supposed to fix it, but I’m not sure whether that commit is part of a release. Part of me wonders whether your lab environment is running a slightly newer LightDB than PSU 2.7.1 and that’s why the connection string change works for you but not me.

I actually can reproduce the LiteDB issue every time in my standard app service (Windows). Even with the shared connection I’m experiencing the problem on startup and cannot login. I haven’t updated the LiteDB library since we’ve been on the most recent version. My next step is going to try to build my own version of LiteDB to see if I can resolve it that way.

It’s only the Linux Container that is working well in Azure. That is running the 2.7.3 Linux image from Docker Hub.

1 Like

After many, many tests over the last few days, I think I’ve resolved the LiteDB issue. I was able to create a test application that would exhibit the behavior really quickly and finally tweaked LiteDB in a way that has given me 100% success rate for the test app and with PSU.

If you want to try it, you can download the DLL here.

You will need to replace it in D:\home\site\wwwroot\ in your Azure app. I’ve just been deploying via FTP to test. I am not using connection=shared in my connection string.

4 Likes

This is great news! I’ve swapped in the new DLL and restarted the app, and after a bit of fiddling with scripts etc the log is up to 5MB:

image

I kind of expected the db to grow and the log to never get very big, but maybe it only flushes when it hits 8MB? And that’d be why things went awry with the previous version when it hit 8MB?

1 Like

Awesome! Yeah the default checkpoint for the log to data file is 1000 pages and a page is 8kb so it’s about 8 MB by default.

1 Like

Going to run a build with the updated DLL now - sounds like great work again @adam!

Will this be included in upcoming releases? Weighing whether to add a task to my pipeline to inject it.

This will be in the 2.8 release that is out next Tuesday.

1 Like

Having the same issue on v.4.2.20, running as Az webapp in a Linux container…