Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

what this mean?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
brainwave
Smarty Rookie


Joined: 09 Jul 2003
Posts: 22

PostPosted: Thu Nov 06, 2003 12:43 pm    Post subject: what this mean? Reply with quote

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
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Nov 06, 2003 1:02 pm    Post subject: Reply with quote

your script seems to need more memory than the limit of 16M. you can change this value in the php.ini .
Back to top
View user's profile Send private message Send e-mail Visit poster's website
brainwave
Smarty Rookie


Joined: 09 Jul 2003
Posts: 22

PostPosted: Thu Nov 06, 2003 1:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Nov 06, 2003 6:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
brainwave
Smarty Rookie


Joined: 09 Jul 2003
Posts: 22

PostPosted: Fri Nov 07, 2003 8:39 am    Post subject: Reply with quote

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
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Fri Nov 07, 2003 9:11 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
brainwave
Smarty Rookie


Joined: 09 Jul 2003
Posts: 22

PostPosted: Fri Nov 07, 2003 9:24 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP