Developer forum

Forum » Swift » Swift v1 - Issue in Swift_Branding.cshtml under load

Swift v1 - Issue in Swift_Branding.cshtml under load

Pedro Meias
Reply

Hi,

DW 9.17.8 , Swift v1.26.3

Reporting an issue we faced with Swift_Branding.cshtml on a busy prod site

When hitting the "Show Page" button on the backend to rebuild the css fonts, the request was getting stuck, and all other pages on the browsing session would stop responding too. On top of that, the generated branding CSS came out with the font names but no @font-face rules, so the frontend showed a fallback font instead.

The cause is that the template blocks on async methods with .GetAwaiter().GetResult(), and those methods don't use ConfigureAwait(false). On a busy server this stalls the request. It never happened on our staging server because it's idle.

We fixed it by adding ConfigureAwait(false) to the awaits in GetGoogleCss and DownloadAndSavefont.


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

You have to upgrade both DW9 and Swift to the latest. Changes have been made.

 
Pedro Meias
Reply

Thank you Nicolai

 

You must be logged in to post in the forum