Large text in Editor makes Blazor Server app drop connection - attempting to recconnect msg appears

Hi

I have a Blazor Server .Net 8 web app. Im running:

<PackageReference Include="Syncfusion.Blazor" Version="26.1.41" />

When the editor has over 20,000 (approx) characters in the editor the .razor page seems to disconnect for a few seconds. I get the standard Blazor "Attempting to reconnect to server attempt 1 of 8". It lasts for a few seconds. Any idea why this happens, it seems to be due to the SfRichTextEditor. I have created a simple page with just this control and can replicate. My code is below. Any idea how can stop the dropping of the connection. The _scopeOfWork string is populated on page initialise


<SfRichTextEditor ID="txtScopeOfWork" @bind-value="_scopeOfWork">

    <RichTextEditorToolbarSettings Items="@Tools" />

</SfRichTextEditor>

    private List<ToolbarItemModel> Tools = new List<ToolbarItemModel>()

    {

        new ToolbarItemModel() { Command = ToolbarCommand.Bold },

        new ToolbarItemModel() { Command = ToolbarCommand.OrderedList },

        new ToolbarItemModel() { Command = ToolbarCommand.UnorderedList },

        new ToolbarItemModel() { Command = ToolbarCommand.SourceCode },

        new ToolbarItemModel() { Command = ToolbarCommand.Undo },

        new ToolbarItemModel() { Command = ToolbarCommand.Redo }

    };


7 Replies 1 reply marked as answer

VJ Vinitha Jeyakumar Syncfusion Team July 15, 2024 06:04 AM UTC

Hi Indy Gill,

Your reported issue can be resolved by increasing the buffer size when dealing with large datasets. Please refer to the below code,


Code snippet:
Program.cs
 builder.Services.AddSignalR(option => { option.MaximumReceiveMessageSize = 100 * 1024; });


Add the above code in your blazor server application to resolve the reported issue from your end.

Regards,
Vinitha

Marked as answer

IG Indy Gill July 15, 2024 08:26 AM UTC

Great, thanks for that it worked a treat 



VJ Vinitha Jeyakumar Syncfusion Team July 16, 2024 04:43 AM UTC

Hi Indy Gill,


We are glad to assist you


IG Indy Gill replied to Vinitha Jeyakumar July 22, 2024 01:57 PM UTC

HI

Im getting the "attempting to reconnect page" again.  It happens when the user has data in the clipboard.  To replicate try the following:

1) Add about a 20,000 characters of text to the Editor.
2) Save the response back to the object/database

3) Reload the text editor with all its content, SELECT all the text in the Editors and COPY it
4) Then PAST the text that was just copied below the original text - so you have duplicated the text
5) Then try and SAVE the object to the database.  You will get "attempting to reconnect" screen for a few seconds

Let me know if you need more information



VJ Vinitha Jeyakumar Syncfusion Team July 23, 2024 10:31 AM UTC

Hi Indy Gill,


Your reported issue can be resolved by slightly increasing the MaximumReceiveMessageSize like below,

 builder.Services.AddSignalR(option => { option.MaximumReceiveMessageSize = 200 * 1024; });

 

Regards,
Vinitha


JA Jawaid Akhter February 4, 2025 12:05 PM UTC

Is it possible per page/component rather for whole application?



VJ Vinitha Jeyakumar Syncfusion Team February 5, 2025 06:53 AM UTC

Hi Jawaid Akhter,

We would like to inform you that increasing the buffer size is applicable for whole application.

Regards,
Vinitha


Loader.
Up arrow icon