-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting error "Connection string changed, disposing context" when enabling Content Delivery API #16624
Comments
Hi there @fbpenalosa! Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better. We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
Hey @fbpenalosa, thank you for reaching out and taking the time to flesh out this report. Have you been able to reproduce this on a deployed instance with just umbraco running? So removing all packages including usync/uskinned? |
@Migaroez Thank you for the response. Unfortunately, it's not possible to remove USync and USkinned as both of them are baked in our products and thus all of our deployed instances have them. It's very interesting though that I cannot replicate this on my local instance which makes this hard to trace. |
There are no differences between local and deployed except for configuration and environment. If there is an increased access delay towards the persistence layer (sql database) then a race condition/timeout/... can explain a difference in behavior. It seems very similar to this A follow up mitigation of the race condition was fixed in #15649 Could you try and update one of your solutions to v13.1.1+ to see if this resolves the problem? |
There would be no appetite to merge this fix into version 12 I'm assuming? |
I am afraid not as v12 entered the security phase at the end of march. Any reason why upgrading to v13 is not feasable? It should be a fairly easy upgrade and most mainstream packages have been available for v13 for a while and its an LTS afterall |
Not that it's not feasible, it's just a longer development cycle than the need to enable this API allows. As this is just a warning, what are the side effects of enabling this API with this occurring? |
I noticed something replicable locally. To remove the ambiguity of USkinned and other packages, for this test I've used the Umbraco CMS Repo: Repo: https://github.com/umbraco/Umbraco-CMS Replication Steps:
In my tests, I just played around with the Notifications email: You would also notice in this screenshot that I haven't added any content delivery API settings
Please note that in Step 4, there were instances wherein I just modified a property and even without saving it, the error got generated anyway. Again, this only happens when .AddDeliveryApi() is added on Startup.cs The other thought is, is appSettings.config the only file that triggers this or if we update any other file, it will trigger this as well? That theory is yet to be tested too. I wonder if you can try and replicate this on your end as well. Thank you. |
By the looks of this thread, we need to see if this is still occurring in V13 (and potentially 14 and 15). We would like some help investigating this, so I'll mark the issue as up for grabs to maximise the chances of getting it closed sooner rather than later. |
Hi @fbpenalosa, We're writing to let you know that we would love some help with this issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know. For more information about issues and states, have a look at this blog post. Thanks muchly, from your friendly Umbraco GitHub bot :-) |
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
12.3.6
Bug summary
We are getting getting error "Connection string changed, disposing context" after we save and publish content nodes when Content Delivery API is enabled
Specifics
Additional Specs:
Umbraco 12.3.6
USkinned 5.2.0
USyn 12.2.3
Issue Details
We've recently enabled Content Delivery API. After doing that we noticed that we are getting this warning error after we save and publish any content nodes:
“Connection string changed, disposing context“
Here's an example screenshot of the event:
In this example, two of those errors got logged after we published a content node.
Here's some details for that log:
We got rid of these errors for now by completely disabling the Content Delivery API, meaning:
In the appSettings.config we set Enabled = False
And removed AddDeliveryApi() from Startup.cs
I'm not sure what's going or if we need to adjust something
Steps to reproduce
Enable Content Delivery API by following the manual: https://docs.umbraco.com/umbraco-cms/v/12.latest/reference/content-delivery-api#enable-the-content-delivery-api
Add Delivery API in Startup.cs service builder
Save and publish any content page
Please note that we're unable to replicate this locally. These were observed and replicated in deployed instances.
Expected result / actual result
No errors on logs when saving and publishing content pages while Content Delivery API is enabled
The text was updated successfully, but these errors were encountered: