2 questions here really:
1.) within the Castle Dependency Injection, are there any toggle switches to control how cyclic dependencies are handled? I've seen cyclic dependencies identified and raised as exceptions previously, but in upgrading from ANZ v6.9.0 to v9.3.0, it looks like the behavior now is "different". It looks like I may have a cyclic dependency, but some DI resolution is still working? I really only see the cyclic dependency raised when looking at .dump files under a heavier load. But looking at the Parallel Tasks of the .dump file, the DI attempting to resolve cyclic dependencies is expensive and could really impact performance
2.) do you know if Castle has any verbose logging for when it resolves instances? In support of the cyclic dependencies I was troubleshooting, I would love to be able to use Microsoft.Extensions.Logging, and in the appsettings.json, under the Logging
tag, set Castle
to "Debug" logging. When I do that I don't see any change in the logging output.
Thanks! -Brian
Please answer the following questions before submitting an issue.
How have others handled the Microsoft.AspnetCore logging? I am using a ANZ v9.3.0 and ABP v5.14.0 and I haven't changed anything with how the logging frameworks work. Inside of my log4net.config file I have a RemoteSyslogAppender defined
However, when I deploy to my docker container, I still see a lot of logging that is going to the Console.
sedulen_api_1 | 2022-03-14 14:18:08,356 [13] INFO Microsoft.AspNetCore.Hosting.Diagnostics [(null)] - Request starting HTTP/1.1 GET http://localhost/AbpUserConfiguration/GetAll sedulen_api_1 | 2022-03-14 14:18:08,469 [13] INFO Microsoft.AspNetCore.Routing.EndpointMiddleware [(null)] - Executing endpoint 'Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore)' sedulen_api_1 | 2022-03-14 14:18:08,566 [13] INFO Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker [(null)] - Route matched with {action = "GetAll", controller = "AbpUserConfiguration", area = ""}. Executing controller action with signature System.Threading.Tasks.Task'1[Microsoft.AspNetCore.Mvc.JsonResult] GetAll() on controller Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController (Abp.AspNetCore). sedulen_api_1 | 2022-03-14 14:18:09,015 [13] INFO Microsoft.AspNetCore.Mvc.NewtonsoftJson.NewtonsoftJsonResultExecutor [(null)] - Executing JsonResult, writing value of type 'Abp.Web.Models.AjaxResponse'. sedulen_api_1 | 2022-03-14 14:18:09,082 [12] INFO Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker [(null)] - Executed action Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore) in 513.3897ms sedulen_api_1 | 2022-03-14 14:18:09,083 [12] INFO Microsoft.AspNetCore.Routing.EndpointMiddleware [(null)] - Executed endpoint 'Abp.AspNetCore.Mvc.Controllers.AbpUserConfigurationController.GetAll (Abp.AspNetCore)' sedulen_api_1 | 2022-03-14 14:18:09,089 [12] INFO Microsoft.AspNetCore.Hosting.Diagnostics [(null)] - Request finished in 732.9607ms 200 application/json; charset=utf-8
Has anyone identified a way to shut this off ? I don't have any Console logging configured, but I'm still seeing this logging in my docker container console output, and when I run a load test, I am seeing performance issues in my dump files relating to a ConsoleLogger.
Any thoughts or suggestions is greatly appreciated. Thanks everyone! -Brian
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
I have a product that has been working on a dotnet core upgrade (2.2 to 3.1) since April 2021 (it's taken so long due to other feature development work, and not due to ANZ) Since August 2021, we have been running our /develop build of our product on ANZ v9.3.0 in our dev environment and it's ran great. In December 2021, we promoted our /develop build to our UAT environment, and again it ran great. Last weekend, we tried promoting to our PROD environment, and the system completely tanked.
We deploy on Azure AppServices, and we use TerraForm to govern all platform infrastructure configuration, so we know UAT and PROD were configured the same. We also deploy using Docker containers, so we know the code was the same. The only identfiable difference would be data, and we are looking at possible anomalies in PROD data that could have triggered this.
Our resource monitoring in Azure shows healthy performance for memory & cpu resources in our Azure AppServices, as well as CPU and Data I/O in our SQL resources. On our Azure AppService resource monitoring, we did not see hig request queuing or any other measurable metric available in Azure's metrics that could have identified a bottleneck or problem.
The issue we observed is extreme latency. For example the "AbpUserConfiguration/GetAll" endpoint took minutes to execute. Comparing to the current version of our product, it completes sub 200ms in PROD. The extreme latency seemed to affect all API endpoint requests.
As I didn't see any performance issues on our SQL server, I thought perhaps it was a caching issue in SettingsManager, but I confirmed that we were not configured to run Redis or any other distributed cache, so all caching would have been held in memory.
My other thought was could it have been a bottleneck somewhere in the request pipeline, perhaps in validating the JWT Token, but we observed the same latency issues hitting anonymous endpoints from Postman or other browsers in incognito mode, where no Authentication header would have been present in the request.
Lastly, I scanned our code to confirm that we aren't doing anything with sync locks or any other type of optimistic locking.
I realize that this is a broad post, and the ASNZ team isn't responsible for my Azure infrastructure.
I'm curious if anyone else has experienced anything like this? and if so, what your experiences were and possibly what other things we should examine or troubleshoot.
Thanks to the ASNZ community!
-Brian
.NET CORE + Angular v9.3.0
v6.5.0
I have an application that I am upgrading from v6.9.1 to v9.3.0 (I know, it's a big jump. we're long overdue). I see that Settings can now be encrypted. (https://github.com/aspnetboilerplate/aspnetboilerplate/issues/5614)
With this effort, I'm finding some settings that are failing the new Setting decryption feature. However, it's just failing with the technical error and isn't identifying which setting it's failing on.
Is there an easy way to identify which built-in settings are now expected to be encrypted?
I didn't see any documentation on this in the ABP or ANZ documentation, but I could have easily missed it.
If I truncate my AbpSettings table, everything works fine. However, that works for local development, and isn't feasible for a production environmen upgrade. It would be awesome to be able to identify which settings are now expected to be encrypted, so that I could write a DbMigration for this myself if one does not exist built-in.
Thanks!
Looking at [Question #6960](https://support.aspnetzero.com/QA/Questions/6960/Apply-migrations-update-database-on-application-start) The provided answer is awesome, but it looks like it only runs migrations for the HOST database, and I'm trying to adapt this for a MultiTenant setup.
So I have 2 questions:
Referencing the code in the MultiTenantMigrateExecuter.cs
class in the Migrator project, do you foresee any issues retrieving the list of Tenants that have separate connectionStrings, and running CreateOrMigrateForTenant
?
Would running migrations at this PostInitialize method of the XXXEntityFrameworkCoreModule possibly have any interference with IBackgroundJobManager
? Would it be advisable to resolve the IBackgroundJobManager and call .Stop
and .WaitToStop
before running the Migrator functions? (and then calling .Start
again when migrations are complete) ?
Thanks!
Hi everyone,
Has anyone successfully deployed an ANZ system using TerraForm or used Azure Release Pipelines? I realize it's more of an Infrastructure orchestration platform than specific to ANZ, but I'm asking mainly in the context of applying EF migrations.
Currently I use Azure Pipelines for building release artifacts, and for my dev environment I have an Azure Release Pipeline that updates my Azure AppService, where I handle applying EF migrations manually.
In working with my DevOps team, we're exploring moving to TerraForm, and possibly using Azure Release Pipelines to handle provisioning, re-provisioning, upgrade, and scaling our Azure resources, and so we started wondering how the ANZ Migrator would fit into this.
Has anyone developed anything with Azure Release Pipelines or TerraForm scripting that includes building and running the ANZ migrator?
If you've done the work (professionally & used in production today), I would be willing to discuss a possible consulting relationship.
Thanks! -Brian
Possibly a simple question, but has anyone downgraded ANZ 6.9.0 to dotnet core 2.1?
I've been looking to upgrade from ANZ 6.9.0 to ANZ 9.1.0, but I'm not ready to take on that upgrade effort yet, so I was hoping that downgrading from dotnet core 2.2 to dotnet core 2.1 would be a simpler approach.
I'm curious if anyone else has tried this or has an comments, before I start down this effort.
Thanks!
I have a need to modify data that already exists in the database, but the modification logic comes from a business rule in another service.
Is it possible to access an IRepository or another injected service from within a Migration? Are there any issues or drawbacks with this approach?
My alternative is to write a stand-alone application to perform the action that I need to, but I would rather not if possible.
Thanks.
is there a process for requesting access to the zero/... Docker images?
I am experimenting with using the Docker functionality in ASP.NET Zero (I'm on v6.9, but it looks like the build & docker scripts in v9.0 are similar).
when I run the build script I encounter the following:
Error: No such image: zero/host Sending build context to Docker daemon 467MB Error response from daemon: the Dockerfile (Dockerfile) cannot be empty Error: No such image: zero/ng Sending build context to Docker daemon 225.3MB Error response from daemon: the Dockerfile (Dockerfile) cannot be empty
and when I run the up script that is in the build/outputs directory, I encounter the following:
`Pulling zero_host (zero/host:)...
ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.
Continue with the new image? [yN]y Pulling zero_host (zero/host:)... ERROR: pull access denied for zero/host, repository does not exist or may require 'docker login': denied: requested access to the resource is denied`
thanks! -Brian
good morning everyone. I hope everyone is staying healthy & safe.
I'm working on a feature on my project where we want to enable notifications @ an entity level.
We have this working great for the individual notifications, using the AbpNotificationSubscriptions
table and the INotificationSubscriptionManager
and EntityIdentifier
However, also need the ability to turn notifications on/off for the entire entity, just like a user can for enabling or disabling notifications.
Looking at how the framework handles enabling or disabling notifications using AbpSettings
and SettingsManager
and the Abp.Notifications.ReceiveNotifications notification name.
Unfortunately, the scopes for AbpSettings appears to be Application
, Tenant
, and User
, so there isn't a built-in way for an AbpSetting to support an Entity
scope, like Notifications are.
The idea is similar to how settings can be applied to multiple scopes, where the APPLICATION can define a setting that is then overridden by a TENANT, which then can be overridded by a USER. I love this design pattern, and would like to extend it 1 level further, to were a USER could override a setting for a given ENTITY.
To note, I'm running older versions of ANZ (6.9.0) and ABP (4.5.0), so this might be implemented in a newer release. I will check shortly.
Would you recommend trying to extend AbpSettings and SettingsManager to support and Entity
scope? or instead would you recommend creating a new entity entirely and just storing the values separately?
Ultimately what I'm looking to implement is a user's ability to control subscriptions to notifications both Globally as well as specifically for a single Entity. So controls like: 1.) turn on Notification X globally, but turn it off for Record A. 2.) turn off Notification X globally, but turn it on for Record A.
Thanks everyone!