Domanda

I have a website in yii framework

When it comes to more then 200k pages it gives this error: Fatal error: Out of memory (allocated 359923712)

And my hosting server can bring me up to: 250MB

How can I use up to 250MB, an unlimited pages?

This is related to PHP script or cache? Where should I check?

Thanks in advance

È stato utile?

Soluzione

No, it's not the number of pages.

This is related to PHP script (cache is usually to avoid theses kind of problems)

You should check what php script is executed, which part takes long.

You can use memory_get_usage and use throw new Exception("too much memory") if its over the limit you will define at some point of your script (and inside loops if you have).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top