Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Feb 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Fatal error: out of dynamic memory in yy_create_buffer()

    Hi !

    I run a classifieds site. Everything was running fine until today when I saw the following error message on one of the pages that displays all classifieds.

    Fatal error: out of dynamic memory in yy_create_buffer() in /path/to/php/script on line 344

    I can't figure out what's going on.

    Here is some info about my shared server:

    memory_limit: 40M

    SERVER["REDIRECT_DBENTRY"] contains the value
    #MEM 10240

    Please let me know what I should do.

    Thanks,
    James

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Location
    Iran
    Posts
    695
    Thanks
    0
    Thanked 0 Times in 0 Posts
    maybe I'm not good enough for answering your question, but what is yy_create_buffer() ?? I searched the documentation and I couldn't find it, so, it's not a function, right? Plus I don't understand what you exactly mean by a classified site.

  • #3
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    I think you should be directing this question at your host , what database are you using ? + do you always get this message or just occaisionally ?
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #4
    New to the CF scene
    Join Date
    Feb 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am using MySql and PHP. Its a B2B exchange and Members can post trade leads.

    I think yy_create_buffer() function has something to do with Apache.

    Today, this error occured for the first time. It seems it occured because of the increase in the number of trade leads posted. The page actually displays the leads but does not display the page numbers.

    The error occurs in the function that I defined to calculate the total number of pages of trade leads (with 10 trade leads displayed on every page). The pages are supposed to be displayed at the end of the page as follows:

    <-- Previous 1 2 3 4 5 6 7 8 9 10 Next -->

    However due to the error the whole page loads but the above pages numbers are not displayed. What is the best way to calculate and display pages like above ?

    Note: I just noticed that now the error message is not displayed. However the page numbers have disappeared.
    Last edited by divinecharm; 03-16-2004 at 08:57 AM.

  • #5
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    whats the query you are using to get the total count can you post it ?
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #6
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    (i think he'll be using a "select * " or "select ID" or something similar to grab the complete table and then use a mysql_num_rows() to get the count)

    The problem is that you run out of memory during scriptexecution. Your script probably allocated the 40M but if you are using an unefficient way (for instance not using a "select count(*) from table" ) to get some date or prepaire some output, then that will be filled when the table grows.
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •