致命错误:允许内存大小为268435456字节(试图分配71个字节)

时间:2021-04-08 11:00:54

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

当我试图打开我的wordpress脚本中的一个仪表板页面时,我犯了一个错误。

The error message is as follows:

错误信息如下:

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

致命错误:允许在/home/admin/domains/filesick.com/public_html/wp-include / taxonome .php中耗尽(试图分配71字节)的内存大小为268435456字节

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.

我四处询问,被告知必须将内存限制提高到256M以上,所以我将内存限制改为512M,仍然是同样的问题。然后我把它改成了3024米这就是我现在的结果,但这并不能解决问题。

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

所以你能告诉我怎么解决这个问题吗?我应该怎么做?

Waiting for your response.

等待你的反应。

2 个解决方案

#1


36  

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:

WordPress将PHP的内存限制改写为256M,假设之前设置的值太低,无法渲染仪表板。您可以通过在wp-config.php中定义WP_MAX_MEMORY_LIMIT来覆盖这一点:

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

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.

我同意DanFromGermany的观点,256M确实是显示仪表板页面的大量内存。改变内存限制真的是在给这个问题包扎绷带。

#2


11  

I had this problem. I searched the internet, took all advices, changes configurations, but the problem is still there. Finally with the help of the server administrator, he found that the problem lies in MySQL database column definition. one of the columns in the a table was assigned to 'Longtext' which leads to allocate 4,294,967,295 bites of memory. It seems working OK if you don't use MySqli prepare statement, but once you use prepare statement, it tries to allocate that amount of memory. I changed the column type to Mediumtext which needs 16,777,215 bites of memory space. The problem is gone. Hope this help.

我有这个问题。我在网上搜索,采纳了所有的建议,改变了配置,但问题仍然存在。最后,在服务器管理员的帮助下,他发现问题出在MySQL数据库列定义上。a表中的一列被分配给“Longtext”,这将分配4,294,967,295块内存。如果不使用MySqli preparestatement,它似乎可以正常工作,但是一旦使用了preparestatement,它就会尝试分配这么多内存。我将列类型改为Mediumtext,它需要16777,215字节的内存空间。问题是走了。希望这个有帮助。

#1


36  

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:

WordPress将PHP的内存限制改写为256M,假设之前设置的值太低,无法渲染仪表板。您可以通过在wp-config.php中定义WP_MAX_MEMORY_LIMIT来覆盖这一点:

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

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.

我同意DanFromGermany的观点,256M确实是显示仪表板页面的大量内存。改变内存限制真的是在给这个问题包扎绷带。

#2


11  

I had this problem. I searched the internet, took all advices, changes configurations, but the problem is still there. Finally with the help of the server administrator, he found that the problem lies in MySQL database column definition. one of the columns in the a table was assigned to 'Longtext' which leads to allocate 4,294,967,295 bites of memory. It seems working OK if you don't use MySqli prepare statement, but once you use prepare statement, it tries to allocate that amount of memory. I changed the column type to Mediumtext which needs 16,777,215 bites of memory space. The problem is gone. Hope this help.

我有这个问题。我在网上搜索,采纳了所有的建议,改变了配置,但问题仍然存在。最后,在服务器管理员的帮助下,他发现问题出在MySQL数据库列定义上。a表中的一列被分配给“Longtext”,这将分配4,294,967,295块内存。如果不使用MySqli preparestatement,它似乎可以正常工作,但是一旦使用了preparestatement,它就会尝试分配这么多内存。我将列类型改为Mediumtext,它需要16777,215字节的内存空间。问题是走了。希望这个有帮助。