gpt4 book ai didi

数据库错误 : data inserted in one transaction is greater than 10% of redo log size

转载 作者:搜寻专家 更新时间:2023-10-30 22:28:35 27 4
gpt4 key购买 nike

我遇到了 Drupal 内容类型的问题:当我在个性化内容类型中创建一个新的字段类型(例如:文本)时,已经有大约 10 个字段类型,网站变得不可用,我收到这条消息

The website encountered an unexpected error. Please try again later." instead of the website's pages.

如果我不离开页面并点击“删除”(新的字段类型),我就可以返回网站了。如果我允许,那么在刷新页面后,整个网站将无法访问,使其再次运行的唯一方法是在我的网站主机上恢复数据库的保存。

我尝试在两种不同的内容类型中多次添加新字段,结果相同。看起来要创建的字段数量是否有限制(我最多只为整个网站制作约 ~25 个...)。

谁能帮我解决这个问题?

这是“长”错误消息日志的开头:

The website encountered an unexpected error. Please try again later. Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42000]: Syntax error or access violation: 1118 The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size.: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 5 [:db_insert_placeholder_1] => php [:db_insert_placeholder_2] => %type: @message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{s:5:"%type";s:45:"Drupal\Core\Database\DatabaseExceptionWrapper";s:8:"@message";s:1062480:"SQLSTATE[42000]: Syntax error or access violation: 1118 The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size.: INSERT INTO {cache_default} (cid, expire, created, tags, checksum, data, serialized) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6) ON DUPLICATE KEY UPDATE cid = VALUES(cid), expire = VALUES(expire), created = VALUES(created), tags = VALUES(tags), checksum = VALUES(checksum), data = VALUES(data), serialized = VALUES(serialized); Array ( [:db_insert_placeholder_0] => views_data:en [:db_insert_placeholder_1] => -1 [:db_insert_placeholder_2] => 1513178721.199

还有很多文字……最后一段是:

Drupal\dblog\Logger\DbLog->log(3, '%type: @message in %function (line %line of %file).', Array) (Line: 104)
Drupal\dblog\Logger\DbLog->log(3, '%type: @message in %function (line %line of %file).', Array) (Line: 136)
Drupal\Core\Logger\LoggerChannel->log(3, '%type: @message in %function (line %line of %file).', Array) (Line: 65)
Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber->onError(Object) (Line: 92)
Drupal\Core\EventSubscriber\ExceptionLoggingSubscriber->onException(Object, 'kernel.exception', Object) (Line: 108)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.exception', Object) (Line: 230)
Symfony\Component\HttpKernel\HttpKernel->handleException(Object, Object, 1) (Line: 79)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 657)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

最佳答案

搜索配置文件:

sudo find / -name my.cnf

默认配置位于:/etc/mysql/my.cnf

在mysql目录下搜索innodb_log_file_size

sudo grep -rl "innodb_log_file_size" /etc/mysql

只是为了检查你是否已经配置了一些东西

打开我的.cnf:

sudo nano /etc/mysql/my.cnf

您可以编辑此文件并添加

[mysqld]
innodb_log_file_size=256M

[mysqld]是段名,用ctrl+W在nano里搜索,不要加两次!

或者最好创建 /etc/mysql/conf.d/innodb.cnf 并将上面的 innodb 配置放在那里。

注意!确保你有

!includedir /etc/mysql/conf.d/

my.cnf 文件中的字符串,用于包含自定义配置。

sudo service mysql restart

关于数据库错误 : data inserted in one transaction is greater than 10% of redo log size,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47796858/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com