gpt4 book ai didi

php - WordPress fatal error :在1832行的wp-includes/wp-db.php中,已用尽的内存大小为536870912字节(试图分配77字节)

转载 作者:行者123 更新时间:2023-12-03 15:41:01 27 4
gpt4 key购买 nike

我最近在我的WordPress网站上注意到有时会收到500 Internal Server Error。我检查了日志,并且有很多行,例如:

[Mon Oct 03 01:25:24.357439 2016] [fcgid:warn] [pid 12840] [client 83.27.211.107:36968] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 77 bytes) in /var/www/vhosts/mywebsite/public_html/wp-includes/wp-db.php on line 1832



我试图增加内存限制:

define( 'WP_MAX_MEMORY_LIMIT' , '512M' );

define( 'WP_MEMORY_LIMIT' , '512M' );



甚至更多,但是没有用。无论我设置什么,它仍然超出内存限制一些字节。我认为对数据库的某些查询存在问题,但是如何检查哪个呢?

includes / wp-db.php的内容:
} else {
$num_rows = 0;
if ( $this->use_mysqli && $this->result instanceof mysqli_result ) {
while ( $row = mysqli_fetch_object( $this->result ) ) {
$this->last_result[$num_rows] = $row;
$num_rows++;
}
} elseif ( is_resource( $this->result ) ) {
// server crashing at line below
while ( $row = mysql_fetch_object( $this->result ) ) {
$this->last_result[$num_rows] = $row;
$num_rows++;
}
}

// Log number of rows the query returned
// and return number of rows selected
$this->num_rows = $num_rows;
$return_val = $num_rows;
}

最佳答案

该问题是由iThemes Security插件引起的。我关闭了它,错误消失了。如果我知道此插件的哪一部分导致超出内存限制,我将进一步调查此问题并编辑此答案。

关于php - WordPress fatal error :在1832行的wp-includes/wp-db.php中,已用尽的内存大小为536870912字节(试图分配77字节),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39840555/

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