Jump to content

Slow admin


Peter Knight
 Share

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

Link to comment
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.

Link to comment
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

 

 

Link to comment
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

Link to comment
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.

Link to comment
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
 Share

×
×
  • Create New...