View previous topic :: View next topic |
Author |
Message |
brainwave Smarty Rookie
Joined: 09 Jul 2003 Posts: 22
|
Posted: Thu Nov 06, 2003 12:43 pm Post subject: what this mean? |
|
|
hi,
sometimes I get this error message:
Code: |
Fatal error: Allowed memory size of 16777216 bytes exhausted at (null):0 (tried to allocate 43 bytes) in /is/htdocs/xxxxxxx/includes/class.smarty.php on line 603
Fatal error: Allowed memory size of 16777216 bytes exhausted at (null):0 (tried to allocate 140 bytes) in Unknown on line 0
|
Can anybody tell me what this error means und where can I find the bug? Any tipps?
I using Smarty 4.2.3.
Greetings
Sascha |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Nov 06, 2003 1:02 pm Post subject: |
|
|
your script seems to need more memory than the limit of 16M. you can change this value in the php.ini . |
|
Back to top |
|
brainwave Smarty Rookie
Joined: 09 Jul 2003 Posts: 22
|
Posted: Thu Nov 06, 2003 1:07 pm Post subject: |
|
|
THX for answering my post.
but I can't change the php.ini. I have no authorisation to do that.
Can you tell me possible situations where memory is geting out.
Does Smarty needs so much memory?
Sascha |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Nov 06, 2003 6:41 pm Post subject: |
|
|
smarty needs some memory, but not too much.
you can try to unset() variables that you don't need anymore. preferably big arrays and big objects. this will free the memory of these variables. |
|
Back to top |
|
brainwave Smarty Rookie
Joined: 09 Jul 2003 Posts: 22
|
Posted: Fri Nov 07, 2003 8:39 am Post subject: |
|
|
ok thx!
but smarty is the biggest thing in my website! I've tested it yesterday.
Can I somehow make smarty smaler? By deleting something out? Does all the plugins in the plugin folder loaded in memory? I hope not.
I know it's smarty of topic but when I do an mysql-query like this code:
$result = mysql_query("select....
and this 5 or 10 times again. This needs no more memory, because the $result var will always be overwrite again and again! Or is that the wrong opinion?
Greetings from Germany and sorry for the bad english
Sascha |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Fri Nov 07, 2003 9:11 am Post subject: |
|
|
a simple template displays with 1M (and i'm sure even much less) memory_limit. and you have 16 of them. maybe you have an endless loop somewhere in your templates that sucks up the mem. |
|
Back to top |
|
brainwave Smarty Rookie
Joined: 09 Jul 2003 Posts: 22
|
Posted: Fri Nov 07, 2003 9:24 am Post subject: |
|
|
I benchmarked it yesterday and the average memory need is between 0,700 and 1,100 MB!
I have one page and they is either in the 1 M range, but sometimes wenn I reload and reload it again it will be 16M! Than the script run's out of memory!
I see, I will check my code again.
THX |
|
Back to top |
|
|