WordPress.org

Support

Support » WP-Advanced » Too many static pages crashing database?

Too many static pages crashing database?

  • Ok, so I have approximately 1300 static pages that I created outside of my normal posts. I created each page separately for a high resolution photograph that was linked to from my post. For example, my original post would have ten thumbnails and clicking each thumbnail would take you to one of these static pages which shows the photograph.

    I’m having a problem now though. Whenever I create a new static page with a photo, it is published but it also brings my entire blog down and I can’t access certain parts of the dashboard like posts and pages. I get fatal error messages like maximum time exceeded etc.

    The only way I can fix this is to go into the database and randomly delete some past static pages. That is the only way for me to get everything working again.

    So my question is: did I hit a limit of how many static pages I can have or is my database simply corrupted?

    And if I did reach a limit on pages, is there another way to deal with publishing these photographs outside of the posts.

    Any help is greatly appreciated. Thanks for the time.

Viewing 15 replies - 1 through 15 (of 30 total)
  • Too many static pages will not crash anything, since a page is just a post with a different type. However, you may run into time-out problems and your blog will certainly be a lot slower.

    There are many plugins to do photo publishing with wordpress, I would suggest looking into one of those.

    Thanks for the response, Otto.

    I just automatically assumed that the pages were the problem because everything would go down upon the creation of a page, but never a post.

    I am certainly running into time-out problems and have messed around with increasing the time limits but that hasn’t helped either.

    I’ll look into the plugins and see what I can find to do the job there.

    Thanks again.

    Same here… Look @ http://wordpress.org/support/topic/99927?replies=1 . I fount out that the problem is updating the permalinks…

    Yes, it appears we are having the exact same problem. I thought it might be the permalinks also. Looks like I should do some searching on that problem as well.

    Have searched for a solution over months… But I found nothing 🙁

    What do you mean by “updating the permalinks”? There’s no update to be done. It’s not like permalinks are stored somewhere. They’re done on the fly, they are not “stored”.

    If you have large numbers of static pages, then the process that figures out permalinks can slow down the blog to the point of unusability. This is not a bug, it just doesn’t scale to many thousands of pages without having a bigger and badder system for your database. You could probably add some indexes to remedy the speed issues, it’s not entirely optimal in that respect.

    But there’s no “updating” of permalinks. Ever. Not in WordPress 2.0 and up.

    The permalinks are stored in the database and they are updated by publishing a new page every time.

    The permalinks are stored in the database and they are updated by publishing a new page every time.

    No, actually, they’re not. That’s not how permalinks work at all.

    The rewrite-rules for all pages are stored in one row of the options able. And it gets amazingly big amazingly fast…

    The rewrite-rules for all pages are stored in one row of the options able. And it gets amazingly big amazingly fast…

    Ahh, I see it now. That’s for pages and attachments only though, which is what confused me.

    Okay, that means that it’ll run out of page space when the row exceeds maximum row size. In an MyISAM table, that’s 65534 bytes. Since it’s the page names that are the determining factor, I’d estimate that you’re looking at between 800-1500 pages, maximum, depending on page name length.

    This is a rather dumb way to do it, BTW. It should just select post_name from wp_posts where post_status = ‘static’ instead, to get the allowable page name. Storing them in a single row in options is silly. Hierarchy does make it trickier, but not too much so, I think.

    I have been trying to find the email thread I had with Mark Jaquith on this just a couple of weeks ago in which he kindly explained to me what and how the table row is used but sadly seem to have deleted it.

    It is a single row in the Options table with a key of ‘rewrite-rules’. I only have 35 or so ‘pages’ in my posts table but this row is over a MB in size so I should imagine someone with hundreds of pages is going to suffer problems.

    In my case (and I suspect most cases) the row only seemed to appear after I updated my permalink structure, at least that is when I first noticed it.

    I would politely suggest that before you just reply and tell me there is no such thing, you do some fact checking.

    Well, like I said above, there should not be any such thing. It’s silly. And it appears to only be for Pages and not Posts and the rest, which confused me. Permalinks for other things don’t store the URIs in the database, so having just pages do it is highly strange.

    Ah – you changed your post! That’s cheating.
    So – how do we get rid of it if it’s not needed?

    The only way I can see to get rid of it would be to rework WP_Rewrite->page_rewrite_rules(). How exactly it would have to be reworked, I’m uncertain. I need to study WP_Rewrite in more detail.

    Otto42 – any luck reworking WP_Rewrite? It was pretty hard digging up this post, so I started by own thread about the same problem:
    http://wordpress.org/support/topic/100900?replies=3

    Mods – I’d like to keep everything in this thread if possible to help folks with the same problem.

Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘Too many static pages crashing database?’ is closed to new replies.