WordPress.org

Forums

[closed] WP admin, even 3.3, incredibly slow. (65 posts)

  1. impulse8
    Member
    Posted 3 years ago #

    thanks rick. I will be trying out 3.3.1. hopefully it shows some improvement.

  2. chasez123
    Member
    Posted 3 years ago #

    After I upgrade to 3.3.1, it quite smooth like usual. But the other day, all my websites become slow. Is hard to post something in the backend too. Even my cpanel loading slow also. Any solution yet?

  3. mitchmccoy
    Member
    Posted 3 years ago #

    We host hundreds of blogs on a single WordPress installation. We noticed that the admin got progressively slower as we added more sites. What we discovered was that for the super admin, all user_meta records were being loaded into memory on every page click. Each site could potentially create 4+ user_meta records. 250 sites X 4 records = 1000 records being loaded into memory on every page click. WordPress needs to have a blogID column added to this table so it only loads user_meta records relevant to the current blog.

  4. penderra
    Member
    Posted 3 years ago #

    I have the same slowdown problem on a server with 13 sites and 512MB RAM. The straight HTML sites are as good and fast as always, but the WP sites all slow. WP 3.3.1 loaded on all WP sites, and I think I noticed the sites slower after 3.3. Control panel also slow

    Unfortunately, I only found this thread after upgrading server package :-(

  5. potatomaster
    Member
    Posted 3 years ago #

    I ran into the exact same issue. Content pages intermittently loading slowly, some admin pages loading slowly or in the case of the plugins page, not all all.

    The root cause ended up being that a firewall was preventing the server from communicating over port 80. Users could reach the site fine over port 80, but any attempt by PHP code to load anything via port 80 directly was being blocked. Once this was resolved, all issues disappeared.

    Now, this is just my observation and there is more to this, such as what WordPress is attempting to load from a remote source, but this did fix things immediately.

  6. Pothi
    Member
    Posted 3 years ago #

    @potatomaster Thanks for sharing your fix. It, kind of, solved a similar issue I had in my client's site. In my case, the web host was not blocking the port 80 requests, but the requests were only delayed (to avoid any spam? only that webhost knows).

    For this...

    Now, this is just my observation and there is more to this, such as what WordPress is attempting to load from a remote source, but this did fix things immediately.

    From what I know, on WP dashboard, WP loads widgets that fetch latest WP news, latest plugin information, etc. I wish I know more to explain any other requests that WP sends out.

  7. orbsid
    Member
    Posted 3 years ago #

    I am getting SUPER SLOW page load and connection error while in admin panel of wordpress 3.3.1. If it does load a page it takes a very long time but most times it times out. To check, I then go directly to root via ftp and it won't allow it to connect. Once it does connect via FTP, then http page I was trying to load in admin will load but any adjustments made are very slow or again times out. If I don't access admin on wordpress, server has no issues. Any help would be greatly appreciated.

  8. digitaltoast
    Member
    Posted 3 years ago #

    I've got the same problem as everyone else.
    orbsid - that's interesting. You're saying that in order to get the page to load, you have to connect via another method first?

    My server had plenty of free RAM, low load, front end loads very fast. Admin takes 10+ seconds per page, sometimes I cannot edit pages at all.

  9. orbsid
    Member
    Posted 3 years ago #

    digitaltoast, once you go into WP admin, it seems to start a php script that disconnects the server. I used FTP to verify that I was unable to connect to server after login in WP admin.

    I would keep attempting FTP connections until it connected back to the root directory. Then when I went back to the WP admin page, it would load Sloooooooowly but click to two later, it disconnected again.

    I would go back to FTP to see if I could access root directly and I couldn't! Verifying that it was something to do with the ADMIN PANEL in wp that created the server to literally disconnect.

    If i stay out of wordpress admin, or view other content on server, all worked fine.

  10. talkingnews
    Member
    Posted 3 years ago #

    OMG! No, in fact OMFG!!1!!! I've cracked it! For me, at least.

    The short story

    - in my case, running php-fpm on ubuntu:

    nano /etc/php5/conf.d/apc.ini

    You should see:

    extension=apc.so

    paste in the below lines:

    apc.shm_size="196"
    apc.ttl=0
    apc.max_file_size="10M"

    save and close.

    Do service php5-fpm restart.

    Now go to your WordPress admin and watch that sucker fly with near instant response.

    The long story
    I was so damn sick of this slow admin I just decided to keep going, trying stuff.

    Finally, I came across this post:
    http://stackoverflow.com/questions/3723316/warning-require-once-function-require-once-unable-to-allocate-memory-for-p
    then this
    http://groups.drupal.org/node/75583
    which led me to this post:
    http://www.litespeedtech.com/support/forum/showthread.php?t=4366
    and finally this:
    http://2bits.com/articles/high-php-execution-times-drupal-and-tuning-apc-includeonce-performance.html

    The key to this was "download http://pecl.php.net/get/APC extract and run the apc.php, there you have a nice diagram how your cache usage look like"

    It showed APC was completely using its tiny default 32Mb, and was 100% fragmented. I've been running it for an hour, and see Hits: 70874 (98.6%) Misses: 991 (1.4%) Used: 124.4 MBytes (63.5%) Fragmentation: 0.00%

    Before this tweak it was something like 70% misses and 100% fragmentation. No wonder WordPress was running slow!

  11. RogerWheatley
    Member
    Posted 3 years ago #

    @talkingnews - Great solution!!! Wow... Nice follow up post! Thanks muchly!! :)

    I should note that after a time, I had over 25 installations of WP 3.3.0, experiencing this slow issue.

    After upgrading to WP 3.3.1, the issue went away. (I'm assuming some issue was addressed in the x.1 update? - Although I've not followed up on any of that).

  12. digitaltoast
    Member
    Posted 3 years ago #

    @talkingnews's solution worked for me as well.
    It's incredible, the admin is so fast now its like I'm running it on localhost now.
    I'm seeing a little fragmentation of about 1% but I run many sites on that host.
    I've given it 196Mb but when I run top and ps_mem.py it doesn't seem to show any more memory used. Does it take it from the overall php allocation?
    Anyway, problem solved. I think I need to understand APC a but more.

  13. Premium23
    Member
    Posted 3 years ago #

    My sites are with a host (ipage). How do I apply this?

    "nano /etc/php5/conf.d/apc.ini

    You should see:

    extension=apc.so

    paste in the below lines:
    apc.shm_size="196"
    apc.ttl=0
    apc.max_file_size="10M"

    "

  14. Premium23
    Member
    Posted 3 years ago #

    I believe I solved the issue for my blog: http://www.premium23.com

    Solution
    "#2 Changing the Memory Limit via wp-config.php

    If you don’t want to mess with the PHP.ini file, then you can go for this method. In this you won’t be needing to create any extra file in your Directory. Just Adding define('WP_MEMORY_LIMIT', '64M'); in your ‘wp-config.php’ file would increase your PHP Memory Limit to 64 MB."

    Note: I changed mine to 128 MB

    Source
    http://www.dailyblogging.org/wordpress/increase-wordpress-memory-limit/

  15. thelaw
    Member
    Posted 3 years ago #

    Wow - I am glad I discovered this thread. I too have been hit with major admin area slowdowns that I cannot identify and are unfortunately inconsistent. I have two similar multisites on the same server on different domains. On the test multisite (same server), 3.3.1 is very speedy on all sites. On the main site, the admin for the network and root blog is horrifically slow, even with all plugins turned off for the root blog/site.

    1 - Log slow queries is not identifying any admin related slowdown, despite huge slowdowns for the page load.
    2 - On the root blog/site and network, just trying to view the first page of "all users" with nothing but name appearing takes about 40 seconds. Clicking on plugins is the same, deleting or deactivating one can take a 1-3 minutes. The rest of the admin section flies.
    3 - The front end is experiencing a significant slowdown on the root blog. The others are lightning fast - despite having the same plugins and far more activated. I don't know if it means anything, but I do have an SSL certificate for the main site's domain but not for the test site.

    Here is where it gets interesting:

    Using webpagetest I get a MAJOR slowdown from wait time (time to first byte) on the root site. When I use another site from the multisite (and despite more plugins) the TTFB and wait period is at least 40% lower if not more in each instance.

    I've noticed that when I use showprocesslist (not showing the query for some reason) I do see about 10 "Sleep" entries sitting there. When I click on the "All Users" in the admin, I see two queries running at the same time although I don't know what they are. If I wait for all of them to terminate, the site starts to be more responsive (everything but hitting the users area of the admin.) This explains why turning off plugins didn't make a difference - it was a matter of waiting until these unidentified queries terminated.

  16. Premium23
    Member
    Posted 3 years ago #

    Since I'm on a hosted server, I did:

    define('WP_MEMORY_LIMIT', '64M'); in your ‘wp-config.php’ file would increase your PHP Memory Limit to 64 MB."

    But changed it to 1024 MB for my main blog.

    Took my site from an 10-second load time, to ~2.5s.

    Also tried 4096 MB, but the site stopped working :)

  17. thelaw
    Member
    Posted 3 years ago #

    This is one of the queries that keeps hitting the slow query log:

    SELECT wp_users.* FROM wp_users INNER JOIN wp_usermeta ON (wp_users.ID = wp_usermeta.user_id) WHERE 1=1 AND (wp_usermeta.meta_key = 'wp_capabilities' ) ORDER BY user_login ASC;

    and a ton of these errors in my error log - coming from the wp-includes/plugins.php

    [Sun Jan 29 07:24:14 2012] [error] [client 123.123.123.123] PHP Warning: next() expects parameter 1 to be array, boolean given in /home/mysite/public_html/wp-includes/plugin.php on line 407, referer: http://www.mysite.com/wp-admin/plugins.php?deactivate=true&plugin_status=all&paged=1&s=
    [Sun Jan 29 07:24:14 2012] [error] [client 123.123.123.123] PHP Warning: current() expects parameter 1 to be array, boolean given in /home/mysite/public_html/wp-includes/plugin.php on line 403, referer: http://www.mysite.com/wp-admin/plugins.php?deactivate=true&plugin_status=all&paged=1&s=

  18. thelaw
    Member
    Posted 3 years ago #

    FWIW, I'll leave a final post here and allow others to continue the conversation who are far more knowledgeable in this are than myself. The above timeouts and issues may be caused by failure of the processes to complete properly. I was getting timeout warnings in the error log so I did what I had to do - testing with all network plugins and every plugin in my root blog (the super slow one.) Here are the results for my very good hardware.

    Navigation through everything but the users panel (30k users) is lightning fast but slows down eventually. Turning on and off plugins didn't isolate a problem with an indivdual plugin. But even with all off, I'm seeing lots of sleeping processes that build up and are the cause of hanging the admin panel. (None of the back end queries are logged as slow queries.) Here's my output. If I find a solution, I'll report back but this seems to be the primary cause for my slowdown:

    mysql> show processlist;
    +-------+-----------------+-------------------+-----------------+---------+------+-------+------------------+
    | Id | User | Host | db | Command | Time | State | Info |
    +-------+-----------------+-------------------+-----------------+---------+------+-------+------------------+
    | 37837 | mysite_myadmin | localhost | mysite_wpdbase | Query | 0 | NULL | show processlist |
    | 38534 | mysite_myadmin | 10.10.10.xx:35243 | mysite_wpdbase | Sleep | 4 | | NULL |
    | 38544 | mysite_myadmin | 10.10.10.xx:35253 | mysite_wpdbase | Sleep | 0 | | NULL |
    | 38559 | mysite_myadmin | 10.10.10.xx:35270 | mysite_wpdbase | Sleep | 0 | | NULL |
    | 38571 | mysite_myadmin | 10.10.10.xx:35284 | mysite_wpdbase | Sleep | 0 | | NULL |
    | 38583 | mysite_myadmin | 10.10.10.xx:35296 | mysite_wpdbase | Sleep | 0 | | NULL |
    | 38593 | mysite_myadmin | 10.10.10.xx:35308 | mysite_wpdbase | Sleep | 0 | | NULL |
    | 38734 | mysite_myadmin | 10.10.10.xx:51881 | mysite_wpdbase | Sleep | 0 | | NULL |
    | 38740 | mysite_myadmin | 10.10.10.xx:51887 | mysite_wpdbase | Sleep | 0 | | NULL |
    | 38817 | mysite_myadmin | 10.10.10.xx:51976 | mysite_wpdbase | Sleep | 2 | | NULL |
    +-------+-----------------+-------------------+-----------------+---------+------+-------+------------------+
    10 rows in set (0.00 sec)

    When the sleeping process eventually terminate, the admin panel responds very quickly everywhere but in the users area of the admin. That area takes at least 40-60 seconds just to show a screen of the first 10 users, only user name (no other metadata) and now frequently shows a blank white screen. Need to find what's causing these processes and will have to investigate why a query of just the first 10 users is too much for the WP admin to handle.

  19. thelaw
    Member
    Posted 3 years ago #

    FYI - I believe I just solved this huge problem after a week of work. Apparently I had one instance of a plugin called php-exec running in one site. Even though it had nothing to do with other sites, it appears to have been creating extra http requests and sleep processes in mysql. After the last 20 minutes of testing, removing it entirely from my system has removed virtually all of the excessive sleep processes. Huge relief.

  20. IAmMarchHare
    Member
    Posted 3 years ago #

    I've been banging my head about this for some time. Ever since upgrading, the admin pages on two sites have been getting steadily slower with each navigation load. It turns out that the culprit was actually the Broken Link Checker plugin. It must do the check on every load to have this effect. Disabling it makes the sites return to normal within minutes. Not a big problem in one sense, since having it on all the time isn't necessary to begin with; it is only needed when I have time to fix broken links.

    Question: I don't own the hosting server, so I'm limited in what I can and cannot do. Is there an easy way for a non-system admin to determine which plugin is causing memory or other issues other than trial and error?

  21. Pothi
    Member
    Posted 3 years ago #

    @IAmMarchHare Please check out p3 profiler. It might help you to some extend.

  22. IAmMarchHare
    Member
    Posted 3 years ago #

    @Pothi: That is a good and useful plug-in, but just in case anyone's still reading this, it did not identify the bad plug-in, perhaps because it appears to not check the admin page (or, perhaps it just misidentified the plug-in because the admin page was so slow). However, it's a keeper unless I find something better!

  23. wmike1503
    Member
    Posted 3 years ago #

    Well,

    Here we are again - an upgrade that breaks something that was working perfectly fine ( a common thread throughout the software industry ).

    With the constant nagging by WordPress, in the admin area, to upgrade, I, foolishly did so.

    As mentioned above - I now have all my sites running like dogs - hopeless.

    Are we really expected to disable everything to try to identify the problem? Whatever happened to developers making sure the update works before pushing it out.

    Having said that, I have tried all of the suggested steps, disabling plugins, etc.

    The simple fact is, there is obviously a big problem with this release. I suspect the WordPress developers know this.

    I am surprised that there seems to be a total lack of comment from the developers on this forum.

    Very disappointed with this. So what to do - rollback my sites to an earlier, working version or look for alternatives?

    Cheers,

    Mike

  24. rickssekhon
    Member
    Posted 3 years ago #

    Here's the final solution for all those are facing speed issues with wordpress 3.3 and above...

    Simply add this code in WP-CONFIG.php file...

    define('WP_MEMORY_LIMIT', '512M');

    You may change the 512M to 1024M or lower(256M/128M) but don't use higher values like 2048M/4096M, otherwise your website stop working.

    I have tested this solution on almost 20+ different hostings and it worked for all.

  25. bluesquares
    Member
    Posted 3 years ago #

    I found the solution to my slowdown in my PHP error log in Cpanel.

    For some reason, the WP_CONTENT folder was assigned 777 permissions. Once I changed it back to 755 using Cpanel's File Manager, the site started blazing again.

    I'm running a VPS server.

  26. Jay
    Member
    Posted 3 years ago #

    @rickssekhon thanks for that. It briefly speed up the back end, but still at times when publishing a post it still lags.

  27. handywebman1
    Member
    Posted 3 years ago #

    I did the WP-CONFIG change -- [ define('WP_MEMORY_LIMIT', '512M'); ], and I modified the WP-CONTENT folder's permissions: Using Filezilla for FTP, I right-clicked on the WP-CONTENT folder, selected 'File Permissions', and changed the permissions to 755, selecting the checkbox 'Recurse into subdirectories' -- this last part is what ended up fixing my problem for good.

  28. jcottrell
    Member
    Posted 3 years ago #

    I found that old entries in our server's /etc/hosts file redirected traffic for the slow sites back out to our external IP address. This caused a massive slow-down. By removing them it fixed the slow wp-admin side. The rest of the site was never slow.

  29. gojcus
    Member
    Posted 3 years ago #

    Hi. In what line (or where) do you put the code in wp-config.php. It doesn't work for me.

  30. gojcus
    Member
    Posted 3 years ago #

    I checked ot with serverbuddy and my max is still the same

Topic Closed

This topic has been closed to new replies.

About this Topic