Joomla - 已用完 1073741824 字节的允许内存大小

2022-01-06 00:00:00 php joomla

我的 joomla 网站开始显示以下错误

My joomla website started to show following error

致命错误:已用完允许的 1073741824 字节内存大小(尝试分配 78 字节)

我知道我们可以使用 ini_set 来增加内存限制,但我认为这不是解决这个问题的正确方法.尽管如此,如果我将内存限制设置为无限制 (-1),我将收到内部服务器错误.我完全不知道最近在这个网站上的活动,因为我是新分配的这项任务.我尝试使用 DB 禁用一些插件和模块.我所做的是,只需从 _modules_plugins 中以 id 的降序获取条目并更改 publish0.但没有任何效果.我收到同样的错误(致命错误:允许内存...).我试图打开管理页面,这也没有加载.只是显示一个空白页面.

I know we can increase the memory limit using ini_set, but I believe it is not the correct way to solve this. Even though, if I set the memory limit to unlimited (-1), I will get an Internal Server Error. I am completely unaware about the recent activities on this site, as I am newly assigned to this task. I tried to disable some plugins and modules using DB. What I did is, just fetch the entries from _modules and _plugins with descending order of id and change the publish to 0. But nothing works. I am getting the same error (Fatal error: Allowed memory...). I tried to open the admin page, that is also not loading. Just showing a blank page.

请帮我解决这个问题.我是 joomla 的新手

Please help me to fix this. I am new to joomla

推荐答案

对于这类问题,我认为您不会得到简明的答案,因为它太宽泛了.听起来你有内存泄漏.见:

I don't believe you're going to receive a concise answer for this type of problem as it is far too broad. It sounds like you have a memory leak. See:

  1. 如何查找哪个 PHP 脚本正在泄漏内存?
  2. 诊断内存泄漏 - 已用完 # 字节的允许内存大小

不幸的是,查找内存泄漏的原因很少是一项简单的任务.上面的两个链接确实提供了一些有用的提示,即调用 memory_get_usage 和 Xdebug 扩展名.

Unfortunately, finding the cause of a memory leak is seldom a simple task. The two links above do provide some useful tips, namely placing calls to memory_get_usage and also the Xdebug extension.

即使您不熟悉 Joomla 并且更熟悉代码库,它也可能不会让您更轻松地解决这个问题.

Even if you weren't new to Joomla and more familiar with the code base, it probably wouldn't make solving this problem any easier.

相关文章