WordPress.org

Ready to get started?Download WordPress

Forums

MySQL database memory (22 posts)

  1. lawtai
    Member
    Posted 10 years ago #

    I've had htis problem periodically come up when I try to load my page. It'll say that I'm exceeding my memory allocation and then give an error of what can't load. Is there anyway I can better optimize the tables or my code so that I won't get such errors?

  2. davidchait
    Member
    Posted 10 years ago #

    If you're on a really restrictive host, one thing is the posts-per-page option. That's a killer if you crank it up high.
    -d

  3. lawtai
    Member
    Posted 10 years ago #

    I've currently got posts per page up to 7. So it's possible to get my host to increase the memory size? I was told that I could clear forms/tables at the end of each page to save on memory. Should I consider doing this if I can figure ou thow?

  4. Mark (podz)
    Support Maven
    Posted 10 years ago #

    I would tell your host that you want this sorting, and if they don't do it all for you, move hosts.
    You are paying for tech support - not just for when things go wrong, but in making sure things stay going right, and if the host - who should have all the technical know-how - is telling you what you should do (when all you are using is a very popular and efficient blogging program) then I don't think they are doing their job.
    It does sound like your host is being very restrictive, and that is up to them to alter their settings to enable you to have a blog that runs as intended. Given the high number of WP blogs and that this is the first query I can recall, it's not a WP code problem, it's the host.
    Hassle them, and good luck :)

  5. lawtai
    Member
    Posted 10 years ago #

    heh ok, I'll have to get my host to increase the memory or something. What host do you use?

  6. Mark (podz)
    Support Maven
    Posted 10 years ago #

    I'm hosted through a friend :)
    Try these ?
    http://wiki.wordpress.org/Known%20Good%20Hosts

  7. lawtai
    Member
    Posted 10 years ago #

    heh yea i'm hosted through a friend too lol

  8. lawtai
    Member
    Posted 10 years ago #

    hmm, apparently i don't have a database size limit, so i'm thinking that it's not teh wordpress code itself, but a plugin i might've added. The error that came up with referenced to the user-online plugin, so could that be it?

  9. Mark (podz)
    Support Maven
    Posted 10 years ago #

    I guess the only way to find out is to remove it for a few days and see if the error happens again.
    It's odd though - I really can't recall an error like this being reported here before.

  10. lawtai
    Member
    Posted 10 years ago #

    yea, I've only seen it happen that one time for like a few minutes. maybe it was just a weird error.

  11. lawtai
    Member
    Posted 10 years ago #

    hmm i get this error now:
    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 46080 bytes) in /home/virtual/site29/fst/var/www/html/wp-content/plugins/wp-last-visit.php on line 212
    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 46080 bytes) in /home/virtual/site29/fst/var/www/html/wp-content/plugins/wp-style-switcher.php on line 130
    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 46080 bytes) in /home/virtual/site29/fst/var/www/html/wp-content/plugins/useronline.php on line 67
    and a new php file seems to come up most refreshes until it decides to go through...

  12. lawtai
    Member
    Posted 10 years ago #

    it's weird cause all those errors are so random. I'm gettin gmy host to increase the memory to 16 MB but I'm not sure if that'll really fix it.

  13. Mark (podz)
    Support Maven
    Posted 10 years ago #

    That certainly looks like a plugin error. Which ones are you using ?

  14. carthik
    Member
    Posted 10 years ago #

    lawtai, I can host you if you want.
    mail at carthik dot net is where I live (no, seriously) :)

  15. lawtai
    Member
    Posted 10 years ago #

    well, I turned off some of the plugins last night, but before I had running
    Cutter, Search Hilite, Polls, Recently commented posts, useronline, weather, since last visit, wp mobile edition, and style switcher. Thanks for the offer of hosting, but I'm not sure that it's a hosting problem. I did get my host to increase the memory allocated so I'll have to see if that does anything. But I'm thinking if it's a plugin error, I'll still get the error since it's somehow using up all the memory.

  16. carthik
    Member
    Posted 10 years ago #

    Cool! Let us know if you have any more problems.

  17. lawtai
    Member
    Posted 10 years ago #

    well, i just got my database memory size upped to 16MB so hopefully the problem will go away and I won't have to do something with the code.

  18. ccheaton
    Member
    Posted 10 years ago #

    I get similar errors, but only when I try to create a thumbnail during upload of a large image. For images under 1mb, it seems to work ok. The error I get is:
    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 8192 bytes) in /home/mabennett/public_html/wp-admin/admin-functions.php on line 135
    Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 40 bytes) in Unknown on line 0

    Any idea about how to change this so that it doesn't happen? I'm hosting on my own Linux box, sitting in the next room.

  19. ccheaton
    Member
    Posted 10 years ago #

    This is probably more of a Linux config problem, but ... Help me! I'm not very good with Linux!

  20. ccheaton
    Member
    Posted 10 years ago #

    I also posted this at Ars Forum, and here's what I found out:

    Ok. I figured it out.
    In the file php.ini file, there's a line:
    memory_limit = 8M ;
    which, surprise surprise, is 8388608 bytes. So, if you set this value higher, then it doesn't occur.

  21. davidchait
    Member
    Posted 10 years ago #

    Yeah, that's not a database error, that's a PHP memory limit error, as were all the previously-noted errors.
    Hosts that cap at 8MB should be shot (mine does -- need to 'prove' to them why I need more!).
    -d

  22. ccheaton
    Member
    Posted 10 years ago #

    Just out of curiousity, what type of scripts do you run that require more memory than that?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.