致命错误:允许的内存大小为 268435456 字节已用完(尝试分配 71 字节) [英] Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes)

查看:52
本文介绍了致命错误:允许的内存大小为 268435456 字节已用完(尝试分配 71 字节)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在我的 wordpress 脚本中打开我的仪表板页面之一时出现错误

I'm getting an error when I try to open one of my dashboard pages in my wordpress script

错误信息如下:

致命错误:允许的内存大小为 268435456 字节已用尽(已尝试分配 71 个字节)在/home/admin/domains/filesick.com/public_html/wp-includes/taxonomy.php在线2685

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 71 bytes) in /home/admin/domains/filesick.com/public_html/wp-includes/taxonomy.php on line 2685

我四处询问,被告知我必须将 memory_limit 增加到高于 256M 的值,所以我将其更改为 512M,但仍然存在同样的问题.然后我将其更改为 3024M,这就是我现在拥有的,但这并没有解决问题.

I asked around and was told I have to increase the memory_limit to something higher than 256M, so I changed it to 512M and still the same problem. Then I changed it to 3024M and this is what I have now, but that didn't fix the problem.

所以你能告诉我如何解决这个问题,我该怎么办?

So could you please tell me how to fix this and what should I do?

等待您的回复.

推荐答案

WordPress 将 PHP 的内存限制覆盖为 256M,假设之前设置的任何值都太低而无法呈现仪表板.您可以通过在 wp-config.php 中定义 WP_MAX_MEMORY_LIMIT 来覆盖它:

WordPress overrides PHP's memory limit to 256M, with the assumption that whatever it was set to before is going to be too low to render the dashboard. You can override this by defining WP_MAX_MEMORY_LIMIT in wp-config.php:

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

我同意 DanFromGermany 的观点,256M 确实是渲染仪表板页面的大量内存.更改内存限制确实是在给问题贴上绷带.

I agree with DanFromGermany, 256M is really a lot of memory for rendering a dashboard page. Changing the memory limit is really putting a bandage on the problem.

这篇关于致命错误:允许的内存大小为 268435456 字节已用完(尝试分配 71 字节)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆