Jump to content
Peter Knight

Slow admin

Recommended Posts

Hi guys

I've a PW site running real slow in the back end and was wondering about diagnostic tools.

It's fine on the front end but takes about 12+ seconds to even load a page once I click edit. I often get 504 Gateway Time-out messages too.

I have Tracey Debugger installed but I'm not really sure which options I need to check etc.

Having cherry-picked a few and loaded a page in the front end, I only have one error (a missing include file) which doesn't affect my site.

  • PHP 7.0.12
  • PW 3.040
  • MySQL: 5.5.41-1 

Any tips?

Thanks

Peter

Share this post


Link to post
Share on other sites
4 minutes ago, LostKobrakai said:

Could you take a look at the Timers in the core debug-info panels.

Sorry LostKobrakai - I'm not sure where you mean

Is that some information outputted by TraceyDebugger or a file within /site/core ?

 

 

 

Share this post


Link to post
Share on other sites

The first thing I'd look at are name resolution issues, like e.g. ipv6/ipv4 priority problems (::1 vs. 127.0.0.1 when resolving "localhost"). These often show as extremely slow database connections and are especially noticeable in the backend. It helps to specify the IPv4 address instead of hostname in $config->dbHost if that is indeed the cause.

Share this post


Link to post
Share on other sites

Enable debug mode in the config.php and look in the footer of the admin theme. Those debug tools do have a panel "Timers".

Share this post


Link to post
Share on other sites
2 hours ago, LostKobrakai said:

Enable debug mode in the config.php and look in the footer of the admin theme. Those debug tools do have a panel "Timers".

Here we go...

I'm guessing this isn't normal.

ProcessPageEdit.execute()	56.2027
boot	0.5654 - includes all boot timers
boot.load	0.4976 - includes all boot.load timers
boot.load.modules	0.0750
boot.modules.autoload.init	0.0423
boot.load.fieldgroups	0.0298
boot.load.fields	0.0272
boot.modules.autoload.ready	0.0159
ProcessPageView.getPage()	0.0083 - /processwire/page/edit/
boot.load.pages	0.0062
boot.load.templates	0.0035
boot.load.fieldtypes	0.0002
boot.load.permissions	0.0001
boot.load.roles	0.0000
boot.load.users	0.0000
boot.load.session	0.0000
To add more timers here…

Debug::timer('timer-name'); // start timer, you make up the name
execute_some_code(); // any amount of code you want to time
Debug::saveTimer('timer-name', 'optional notes'); // stop and save timer

 

 

Share this post


Link to post
Share on other sites

@Peter Knight, have you checked your browser console to see if there's any external javascript dependencies that are giving timeouts?

Share this post


Link to post
Share on other sites
4 minutes ago, Rudy said:

@Peter Knight, have you checked your browser console to see if there's any external javascript dependencies that are giving timeouts?

Nothing showing in the browser console but the following flashed briefly in the admin Notifications Module

 Module 'ProcessChangelogHooks' dependency not fulfilled for: ProcessChangelog 13 secs
 404 occurred: /wire/templates-admin/styles/AdminTheme.css.map 22 secs / expires 8 secs 
 404 occurred: /wire/modules/AdminTheme/AdminThemeReno/styles/blue.css.map 

I don't think ProcessChangelogHooks is V3 compatible so I've deleted it from the Modules. I still get the error re the dependency but not sure if that's the cause

Share this post


Link to post
Share on other sites

I see that the bottleneck seems to be ProcessPageEdit so I am wondering if it's parts of the admin, or just when editing a page and if it's only one particular page?

Do you have a module that is hooking into ProcessPageEdit? Maybe try disabling third party modules with Tracy's Module Disabler panel.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By muzzer
      Existing PW site version 2.7.2 core running on php7.1. Site is perhaps 7 yrs old and never misses a beat. Can't speak highly enough about this solid version, but....
      As new php versions are released (v8 in the next year I think?) and each seems to get quicker I'm looking at upgrading to php7.3 or 7.4 and upgrading the site to PW v3.x.
      I've been away from the forums since v3 was released so don't know much about it. I guess it's stable as it's been around for ages now, but what I'm wondering is:
      what are the real advantages of upgrading to v3 for a site which is actively used but with only periodic development. And what are the disadvantages if any? Is there any speed impact (good or bad) in either general site speed under 3.x or admin-use speed/ease of use? any issues with either PW version with newer php versions (>7.1) I should know about? is there any good write-ups/vids about new features etc of v3 compared to v2.7? Thank you
       
    • By Andi
      Getting a little deeper into the ProcessWire state-of-mind here. I seriously think I wouldn't have come back to webdev if it wasn't for this wonderful little gem of a CMS.
      I have an "Options" field added to all users on a site. If the user has anything other then "default" selected, I would like to show a permanent message in the admin like the one in the screenshot, only so that the user can't close it. As a friendly reminder that he changed that option from default to something crazy 🙂
      I've read up on how to send messages to users, but where would I hook into to make this show up all the time in the backend?
      https://processwire.com/api/ref/wire/message/
      Thanks in advance!

    • By BitPoet
      Here's a small new module that adds a "Manage tags" button to the template list, just like the field list already has.
      Easily add, remove and change tags for your templates.
      https://github.com/BitPoet/TemplateTagsEditList

    • By Noel Boss
      👋 PW Pros…
      I have some hooks that I need to bind at the init phase (or even __construct) and I was wondering, and I couldn't find a good and simple way to determine if I'm in the admin. Would be nice if there is a reliable short option to do so, but I can't seem to find one… Is there a coherent way to tell this no matter where I am?
      Right now, I use the following method inside one of my modules:
      public function isAdmin($page = null) { if ( strpos($this->input->url, $this->urls->admin) !== false || $this->process instanceof ProcessPageList || $this->process instanceof ProcessPageEdit || ($page instanceof Page && $page->rootParent->id == $this->config->adminRootPageID) ) { return true; } return false; } @ryan wouldn't it be nice to have something like wire()->isAdmin(); like wire()->user->isLoggedin(); to tell if we are in admin – very early on (probably even in __construct() phase of modules?
    • By Noel Boss
      Admin Theme Boss
      A light and clear theme based on Uikit 3
      Features
      Five unique color options Beautifully redesigned login screens Modern typography using Roboto Condensed Extended breadcrumb with edit links Extends AdminThemeUikit, so you can continue using all current and future AdminThemeUikit features Option to activate theme for all users Compatibility with AdminOnStreoids and other third party modules   Updated and Releases
      There is a shiny new release page where you can subscribe to updates for new releases of AdminThemeBoss.   Color Variants:
      ProcessWire Blue


       
      Dark Black


       
      Vibrant Blue

       
      Happy Pink

      Smooth Green *new with 0.6.1*

       
      Requirements
      Requires a current ProcessWire version with AdminThemeUikit installed and activated.
      Installation
      Make sure AdminThemeUikit is activated Go to “Modules > Site > Add New“ Paste the Module Class Name “AdminThemeBoss“ into the field “Add Module From Directory“ Click “Download And Install“ On the overview, click “Download And Install“ again… On the following screen, click “Install Now“

      Manual Installation
      Make sure the above requirements are met Download the theme files from GitHub or the ProcessWire Modules Repository. Copy all of the files for this module into /site/modules/AdminThemeBoss/ Go to “Modules > Refresh” in your admin Click “Install“ on the “AdminThemeBoss“ Module
×
×
  • Create New...