EFcore 5,MySQL,长文本列,内容大于 4 M(!)B 引发错误

发布于 01-14 07:05 字数 370 浏览 4 评论 0原文

我正在使用“EF core 5.0.9”和 MySQL,并且有一个表也包含此列

`Blob` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci

实体在数据库中写入/存储如下:

await context.SaveChangesAsync();

保存工作正常,直到entity.blob值大于大约4兆(! )字节。 显示错误消息:
“已建立的连接被主机中的软件中止。”

该错误与内容无关,而是与长度有关。
当内容与超过 400 万个“x”字符交换时也会发生该错误。

有什么想法吗?

I am using "EF core 5.0.9" and MySQL and have a table which contains also this column

`Blob` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci

Entities are writen/stored in the database as follows:

await context.SaveChangesAsync();

The saving works fine until the entity.blob value is greater than around 4 Mega(!)Bytes.
Shown error message:
"An established connection was aborted by the software in your host machine."

The error is not content dependent but length dependent.
The error also occurs when the content is exchanged with more than 4 million 'x' characters.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文