Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Cees Booister 18 posts 158 karma points
    Jul 07, 2023 @ 16:03
    Cees Booister
    0

    Newsletter Studio campaign overview runs into a timeout

    We use Umbraco version 10.

    We've created a number of campaigns and when we open the Newsletter Studio section via Email tab and select 'Campaigns', the campaign overview opens. However, it tries to render samples of the campaigns in a thumbnail image per line. This takes so long, the site runs into a timeout. The 25 requests for rendering the sample in the browser are all on pending, so I cannot leave the section because the browser just puts all requests in a queue and my attempt to leave is just waiting for these pending requests.

    Is there a reason why the rendering of this thumbnail takes so long or is there a way to disable showing this thumbnail in the campaign overview?

    Some extra info: I see in the dev console of the browser requests being done to render the campaign (https://domain/__ns/r/RenderCampaign/id of campaign). Such a request takes about 4 seconds. An overview contains 25 of these requests so that would mean that the site takes about 1 and a half minute to render. And sometimes this happens, but also we see that a lot of timeouts start occurring and eventually an out of memory exception breaking the site. When the site breaks because of this campaign overview, restarting the site does not help. We actually have to restart IIS for the site to start working again.

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Jul 07, 2023 @ 16:21
    Markus Johansson
    0

    Hi!

    Can you elaborate a bit on your setup?

    What kind of emails are you sending? Do you have any custom “stuff” like render tasks, macros or custom controls?

    Are you sending campaigns from the “Email”-section or from the content section?

    It sounds really strange that the rendering takes this long, I know that cold rendering might be a bit slower (first time template is used) but after this it should be fast.

    What version of the package and of Umbraco are you running?

  • Cees Booister 18 posts 158 karma points
    Jul 07, 2023 @ 16:42
    Cees Booister
    0

    Hi,

    The emails indeed contain macros. The emails are quite large and contain several sections generated by macros. Emails are sent via scheduled campaigns that we trigger at specific times.

    We are using Umbraco 10.5.1 and as far as I can see version v10.0.3 of NS, at least that is the version I see on the left top when opening Email in the menu. The packages show: version unknown, but that might be caused by our firewall.

    Currently we're simply blocking the rendertask of campaigns via the firewall to stop the site from going down.

    What also might not help is that we have over 50.000 content nodes that the macros select data from.

  • Cees Booister 18 posts 158 karma points
    Jul 07, 2023 @ 17:23
    Cees Booister
    0

    One extra question: When a campaign is created it creates a snapshot. So I would guess the snapshots are shown in the campaign overview thumbnails. It it still looks like these snapshots are built up 'from the ground' instead of being a static block of data. Are the snapshots still built up from the content when requested?

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Jul 08, 2023 @ 04:33
    Markus Johansson
    0

    Hi!

    We do full rendering of each email for the previews and essentially this is just a iframe with the preview. There is no concept of a snapshot or similar.

    There are a couple of options here:

    • Can you optimize the macro code? Or cache/reuse thongs to avoid heavy load? This is the best option as it would benefit rendering during real send outs as well. Ideally rendering should never hit any database or perform heavy work. Are using cached data when you query the nodes? Not and ContentService or MediaService?
    • render a preview-version of you macros when in preview.
    • replace the overview-view with a custom view that does not show the I frame https://our.umbraco.com/forum/extending-umbraco-and-using-the-api/94617-intercepting-a-core-directive-in-angular I have not tried but maybe it would work with hiding the I frame using css (not sure if it will still load the content).

    / m

  • Cees Booister 18 posts 158 karma points
    Jul 11, 2023 @ 07:21
    Cees Booister
    0

    Hi Markus,

    We will try your suggestions and let you know the outcome.

    I do have one question though related to the 'snapshot' part. We've had a discussion in another forum post about the content that is actually sent out (https://our.umbraco.com/packages/backoffice-extensions/newsletter-studio-the-email-studio/comments/111803-newsletter-studio-campaign-looks-to-store-content-separately-and-uses-that-for-sending-the-newsletter).

    When I create a newsletter template and create a campaign, the newsletter that is sent is 'set in stone'. If I change the template or change the content of a macro inside the template before the campaign is scheduled to send the newsletter, I still receive the old data. That is why I thought that there is a kind of static snapshot. But as I understand your answer in this post, even the old newsletter shown in the thumbnail is fully rendered, even if the content in the template itself has changed? Does it then look at previous versions of published content?

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Jul 11, 2023 @ 09:10
    Markus Johansson
    0

    Hi!

    There is different behavior depending on how you create the email.

    If you use our built in “drag and frog”-editor, macros will be rendered during send out and no “snapshot” will be used. But if you are using Umbraco content we need to store the rendered result of the page when the campaign it self is scheduled. During send out render tasks will be applied but any content from the underlying Umbraco page will not be updated.

    Hope this make sense?

    Cheers!

  • Cees Booister 18 posts 158 karma points
    Aug 14, 2023 @ 11:26
    Cees Booister
    100

    Problem was solved by adding the path to __ns to the ReservedPath attribute in the settings. This resulted in a way better performance of rendering the campaign overview and time-out issues are gone.

    Probably the Campaign overview renderCampaign request ran through the entire content tree (60.000 nodes) using up 4-5 second each request. Now it takes maybe 100ms.

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Aug 16, 2023 @ 09:45
    Markus Johansson
    0

    Hi Cees!

    Thanks for sharing the results of the proposed fix.

    This ReservedPath exclusion will be shipped with the package in the future but I'm happy that the workaround solved the problems on your end.

    All the best!

    // Markus

  • Markus Johansson 1938 posts 5866 karma points MVP 2x c-trib
    Aug 23, 2023 @ 23:16
    Markus Johansson
    0

    Hi!

    Just wanted to let you know that this issue has now been fixed. There is a new release out for all supported versions of the package:

    https://www.newsletterstudio.org/installation/

    Change log: https://www.newsletterstudio.org/versions/

Please Sign in or register to post replies

Write your reply to:

Draft