How to Debug “Fatal error: Out of memory (allocated XXX) (tried to allocate XXXXX bytes)”? [closed]

≡放荡痞女 提交于 2019-12-06 04:39:13

Yes, of course.

You have to get your /xxxxx/xxxxx.xxx script and sort things out related to the operation performed on the line 22.
And make it less memory consuming.

There are 2 solutions

If

  • your website has a lot of traffic
  • your server is used to do some memory-intensive stuff (generating PDF/image, etc.)

Then it's normal for the server to run out of memory if there simply is too much people simultaneously on your website. The only solution is to increase it. For a website that count a lot of visitor per day, 550M is between low and average amount.

But if your website has only few traffic, like a small company website, then you might have a problem. Check what processes are eating the memory - using topor htop for example - and act accordingly.

If it's PHP that is consumming too much RAM, usually this kind of error is caused by an infinite loop, or a long one, like extracting a lot of data from the DB, creating object with each of these records, without freeing memory.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!