WordPress.org

Ready to get started?Download WordPress

Forums

Memory issues when edit.php (All pages) loaded (14 posts)

  1. nofearinc
    Member
    Posted 2 years ago #

    Hello everyone,

    I have been working on some server issues for the past month and a half. We have been exploring an existing install and deactivating everything until we ended up with plain install, no plugins, only the content - 2200 pages.

    When navigating to "All pages" listing page throws memory error:

    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 35 bytes) in ../wp-includes/wp-db.php on line 1396

    I used wp-config.php, .htaccess and php.ini memory settings to set the memory size up to 512MB but no luck.

    I have exported the content and tested it locally. Same problem - can't load the "All pages" screen. I separated the exported .xml file in 2 parts - 1750 pages and 390 pages. When I install one of them, the install works (so no invalid content or something).

    I did some research in the edit.php page, passing to post.php, up to the wp() function but I was unable to find the exact query used. Is there any chance that the query WordPress functions in listing page through the get_list_table function try to load the full data instead of limiting the content and optimizing the calls? There are some paging parameters but yet again that's leading to my memory issue.

  2. nofearinc
    Member
    Posted 2 years ago #

    in addition to that, I tried some dummy content population and it built 2500 pages running smoothly. My pages have some shortcodes, could this be the problem? (again, 2011 theme with no plugins)

  3. esmi
    Forum Moderator
    Posted 2 years ago #

    Try asking your hosts to increase the PHP memory allocation.

  4. nofearinc
    Member
    Posted 2 years ago #

    didn't work. Also installed locally - no luck. It works with demo content (empty 2.3K pages), but doesn't work with client content (pages 5-8 paragraphs each + some shortcodes + 24 media items).

  5. esmi
    Forum Moderator
    Posted 2 years ago #

    How much memory is available? The initial message suggest you only have access to 256meg. If the site really does contain 2200 pages, you may have to look at moving to a dedicated server.

  6. nofearinc
    Member
    Posted 2 years ago #

    I tried increasing to 512 but didn't do the trick. Also, when I submit demo content (textual data only) I can run 3K pages with no problem, but this client content has some cdata scripts in pages that might be parsed slowly and heavily (thats my suggestion)

  7. esmi
    Forum Moderator
    Posted 2 years ago #

    Are you still getting exactly the same error message?

  8. nofearinc
    Member
    Posted 2 years ago #

    I get the same error message with the different memory on the top.

    My current state is that the script embedded in most pages (as CDATA embedded code for video loading later) might be parsed in a slow and heavy way. Also, we've tried to switch to dedicated server 1gig of ram, still no luck.

  9. esmi
    Forum Moderator
    Posted 2 years ago #

    Have you looked at optimising this script? Or even replacing it? What exactly does it do?

  10. nofearinc
    Member
    Posted 2 years ago #

    we're working on optimizing right now, but still I don't see any reason for 20 loaded pages in "All pages" (pagination is working of course) to reach a memory error. All other pages are working smoothly and only the page listing doesn't. After some debugging I noticed that the wp() function that calls the specific query for page listing crashes. Similar listing works again called from edit.php but without the page parameter and the query loads as needed.

    I doubt that there is something in the query loading all pages - no offset and limit and something else instead. Pages and posts share the same DB, doesn't make sense not to have problems in post listing.

    And I don't see what page content has to do with it. The only visible data in the listing is ID, title, author and date - content is visible in the single view only.

  11. esmi
    Forum Moderator
    Posted 2 years ago #

    Would either of these two plugins help?
    WP Tuner (for debugging queries): http://wordpress.org/extend/plugins/wptuner/
    WP Optimize: http://wordpress.org/extend/plugins/wp-optimize/

  12. nofearinc
    Member
    Posted 2 years ago #

    WP Optimize didn't help, I'll give WP Tuner a shot, honestly I've used some hook listing plugins and Debogger but Tuner is not something I have used so far, thanks

  13. rcpkrc
    Member
    Posted 2 years ago #

    I am having the same problem and it didnt work. what should l do ?
    could you solve the problem?

  14. nofearinc
    Member
    Posted 2 years ago #

    Not really, I had to split my install into 2 different WordPress installs, it was due to some embedded html or shortcodes that took too much memory parsing.

Topic Closed

This topic has been closed to new replies.

About this Topic