HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


"Allowed memory size of 67108864 bytes exhausted" error.

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#86190 (In Topic #17644)
Avatar

Well-settled

Hello, I have a page that shows a tabular list of the latest 100, 200 and 500 entries in a certain catalogue. Ever since I've upgraded from 7 to 8, I've been getting the following error more and more often when I try to access it (right now it's permanent).

Bear in mind that it's a VPS server, I've got 300 out of 768MB free, memory_limit in php.ini is set to 256MB. Is there anything else I should check in my server settings?

Page is http://www.metal-temple.com/site/latestreviews.htm?max=100

Critical error – bailing out

This is an error that has been elevated to critical error status because it occured during the primary error mechanism reporting system itself (possibly due to it occuring within the standard output framework). It may be masking a secondary error that occured before this, but was never output - if so, it is likely strongly related to this one, thus fixing this will fix the other.

Allowed memory size of 67108864 bytes exhausted (tried to allocate 30720 bytes) [sources/tempcode.php(1629) : eval()'d code at 33]

Back to the top
 
Posted
Rating:
#86196
Avatar

Community saint

Check your .htaccess file for php_value memory_limit .

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#86199
Avatar

Well-settled

There was and it was set to 128M. Raised it to 256M. Still no good.  :$
Back to the top
 
Posted
Rating:
#86200
Avatar

ocPortal defines a limit. I'll come back with a reply soonish.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#86202
Avatar

Well-settled

Thanks yet again Chris :)
Back to the top
 
Posted
Rating:
#86203
Avatar



Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#86204
Avatar

Well-settled

It did work as far as raising the memory is concerned, but it still runs out of memory even with 256M allocated. I have to figure out what's eating all the memory trying to get the last 100 catalogue entries.
This is the part that calls the list.
Can't figure out which template main_cc_embed is connected to though  :lol:

Code

[block="23" select="23*" display_type="2" quick_cache="1"]main_cc_embed[/block]
Back to the top
 
Posted
Rating:
#86205
Avatar

What happens if in sources/tempcode.php you change:

Code

$MEMORY_OVER_SPEED=false;
to:

Code

$MEMORY_OVER_SPEED=true;

?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#86206
Avatar

Well-settled

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 5367 bytes) in /home/metaltem/public_html/sources/tempcode.php(1335) : eval()'d code on line 1
Critical error - bailing out

This is an error that has been elevated to critical error status because it occured during the primary error mechanism reporting system itself (possibly due to it occuring within the standard output framework). It may be masking a secondary error that occured before this, but was never output - if so, it is likely strongly related to this one, thus fixing this will fix the other.

Allowed memory size of 268435456 bytes exhausted (tried to allocate 5367 bytes) [sources/tempcode.php(1335) : eval()'d code at 1]


I am sure there's something wrong on my side, I did some templating to make things appear one way when the list is on the first page and default way when on another page. It did work up to v7 though :S
Back to the top
 
Posted
Rating:
#86207
Avatar

Well-settled

Then again if it was the theme's fault, wouldn't http://www.metal-temple.com/site/latestreviews.htm?keep_theme=default produce a result?

Instead I still get that error.
Back to the top
 
Posted
Rating:
#86209
Avatar

Well-settled

Ok, more info that might be helpful.
Trying to buld the block from scratch.

There's a catalogue category tree that goes like this.

Reviews
|- Blu Ray
|- CD/DVD
    |- A
    |- B
    |- C

    |- Z

etc.

Now if I select a subcategory, say "A" and tabular view, it works just fine. If I select the entire Reviews tree, which in my case is 23*, then I get that error message.

I did the A-Z subcategories before oc portal became friendly towards many entries and it still remains like this till this day.
Back to the top
 
Posted
Rating:
#86211
Avatar

I will take a look when I have some free time.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#86213
Avatar

Well-settled

No prob man, I'm in no hurry and you've already sold like a million issues with my site within a day lol :)
Back to the top
 
Important!
Posted
Rating:
#86286
Avatar

Automated fix message

Palanthas said

Hello, I have a page that shows a tabular list of the latest 100, 200 and 500 entries in a certain catalogue. Ever since I've upgraded from 7 to 8, I've been getting the following error more and more often when I try to access it (right now it's permanent).

Bear in mind that it's a VPS server, I've got 300 out of 768MB free, memory_limit in php.ini is set to 256MB. Is there anything else I should check in my server settings?

Page is http://www.metal-temple.com/site/latestreviews.htm?max=100

Critical error – bailing out

This is an error that has been elevated to critical error status because it occured during the primary error mechanism reporting system itself (possibly due to it occuring within the standard output framework). It may be masking a secondary error that occured before this, but was never output - if so, it is likely strongly related to this one, thus fixing this will fix the other.

Allowed memory size of 67108864 bytes exhausted (tried to allocate 30720 bytes) [sources/tempcode.php(1629) : eval()'d code at 33]

This issue has been filed on the tracker as issue #526, with a fix.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Important!
 
Posted
Item has a rating of 5 (Liked by Fletch)  
Rating:
#86299
Avatar

Well-settled

I applied the fix but I still get the same error after around 20 seconds of the page trying to load. I tried out editing the page and doing a preview the same. Using default template as well.

I'm using MySQL Compare trial to fix all the differences in my table just in case there's something wrong on my side with missing table indexes. Will let you know how it goes.

Thanks for all the hard work, you're the reason why OC Portal > All. :)
Back to the top
 
Important!
Posted
Rating:
#86307
Avatar

Automated fix message

Palanthas said

I applied the fix but I still get the same error after around 20 seconds of the page trying to load. I tried out editing the page and doing a preview the same. Using default template as well.

I'm using MySQL Compare trial to fix all the differences in my table just in case there's something wrong on my side with missing table indexes. Will let you know how it goes.

Thanks for all the hard work, you're the reason why OC Portal > All. :)
This issue has been filed on the tracker as issue #533, with a fix.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Important!
 
Posted
Rating:
#86308
Avatar

I ran on a test catalogue to show 1000 entries in tabular view, via the block. Each entry had 2 columns. This uses 50MB for me. PHP leaks heavily memory during requests (it doesn't clean up after itself) so high memory usage (compared to the size of the output) is inevitable for complex pages, but the optimisations I have done are making it better.

The above change turns off the limits for blocks generated with quick_cache=1.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#86325
Avatar

Well-settled

Chris Graham said

I ran on a test catalogue to show 1000 entries in tabular view, via the block. Each entry had 2 columns. This uses 50MB for me. PHP leaks heavily memory during requests (it doesn't clean up after itself) so high memory usage (compared to the size of the output) is inevitable for complex pages, but the optimisations I have done are making it better. The above change turns off the limits for blocks generated with quick_cache=1.

What puzzles me is this. If I select to show, say, all interviews (around 700 entries, 4 columns) it shows them in 2-3 seconds, almost instantly. If I try to show any subcategory of the reviews, it also works very fast. If I use 23* though (which means everything in Reviews and under - CD/A, CD/B, etc.), I run out of memory. It is 5000 entries of course, but is there a chance that "select" can't handle it? Any way I can force the request  it run though, say, latest 500 of these 5000 entries?
Back to the top
 
Posted
Rating:
#86326
Avatar

Try the main_recent_cc_entries block.

I don't think the ocSelect will be a problem – v8 actually optimises that for catalogues, but even without v8 I think it would be fine unless you have a very deep category structure.

Queries in general could be a problem. Each field is another query, so 5,000 entries would be an enormous 20,000 queries. MySQL is very fast at simple queries though. Maybe I'll take a look at that, we didn't design it to show so much data at once.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#86329
Avatar

Well-settled

main_recent_cc_entries has been heavily modified for use on first page and main_cc_embed works perfectly to allow people to browse through entries (pagination, ability to sort them, etc.).

I'm confused though because it did work in v7. Bit slow but wouldn't give up until it gave some results. Maybe there could be an option to force that block to run the query only though the newest X entries? Dunno if it's possible or I'm talking out of… well you get the idea.  :lol:

Also I took the time to check all tables and fill in the missing indexes so I know it's not table related anymore.

Anyhoo, thanks for taking the time to check it out, it'll be awesome if there's a way to handle all these entries, I know I've become a pain in the butt, if you need access to any part of my site (including ftp/mysql) let me know, I'll be glad to become a live testbed.  :thumbs:
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Expand