News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Allowed memory size exhausted when populating the forum

Started by Dogger, May 29, 2009, 07:27:06 AM

Previous topic - Next topic

Dogger

Hi,

I'm using av script that populates the forum with a couple of hundred boards and child boards. After 25 seconds the following error occurs:

QuoteFatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 16 bytes) in ...\Sources\Subs-Boards.php on line 1025

It seems that it's not freeing memory properly, or something.
Any clues what to do?

Dogger

fixed it the easy way (increased the memory limit)

JBlaze

Hello, just going through some old support topics. Do you still require assistance with this issue?

If this is solved feel free to mark it as solved otherwise reply with some details of what isn't working.
Jason Clemons
Former Team Member 2009 - 2012

Dogger


The workaround was to increase memory limit, so that fixed it.

Still, it would be interesting to find out what caused the problem.
When calling createBoard() (in Subs-Boards.php) many times from inside a loop, that function was eating memory until it reached the memory limit.

But I understand this is outside your ordinary support area (since your script is not used as intended), so I mark this topic as solved.

Dogger

Quote from: Arantor on June 04, 2009, 05:32:05 PM
Even so, eating 128M of RAM is slightly concerning. It would probably have been easier to write a script to populate the database manually for that situation.
Writing directly to db, without using smf:s functions? That probably had taken much more time, to first find out what data should go where and so on.

Dogger

I don't understand you

Quote from: Arantor on June 04, 2009, 06:06:51 PM
Actually it's not that huge to do; it's only a few tables from memory that are affected. It depends how much you're going to do it; if it's a one-off job to set up (and you won't be doing it again) this sort of fix is fine.
doing it manually with phpMyAdmin or something?
And with this method you don't have to invest time in getting to know the table layouts? Then how will you know where to put the data...

Quote from: Arantor on June 04, 2009, 06:06:51 PM
But if you're going to do it a lot, it would be worth investing the time in getting to know the table layouts and writing a script to automate it for you.
And here you're talking about using a script?
But not using the smf:s functions? Inventing the wheel once again...




Advertisement: