Jump to content

iank

Members
  • Posts

    129
  • Joined

  • Last visited

  • Days Won

    2

iank last won the day on August 31

iank had the most liked content!

Profile Information

  • Gender
    Not Telling
  • Location
    Rochdale, UK

Recent Profile Visitors

3,183 profile views

iank's Achievements

Sr. Member

Sr. Member (5/6)

115

Reputation

  1. Hi @adrian, Thanks - I shouldn't have been so hasty - it was just in one PW install, where I'd (several years ago) set the $config->externalPageID to 0 to try to work around this situation when logging 404s: https://github.com/processwire/processwire-issues/issues/259 In other installs everything is fine; and I don't even think that config setting is actually solving anything for me anyway; But thanks as always for such a quick response! Regards, Ian.
  2. Hey @adrian, I came across a minor problem which prevents the Tracy console showing in the debug bar when bootstrapping PW in a standalone PHP script. The error shown is: ErrorException: foreach() argument must be of type array|object, null given in D:\laragon\www\[sitename]\site\assets\cache\FileCompiler\site\modules\TracyDebugger\panels\ConsolePanel.php:172 Stack trace: #0 D:\laragon\www\[sitename]\site\assets\cache\FileCompiler\site\modules\TracyDebugger\panels\ConsolePanel.php(172): Tracy\Bar->Tracy\{closure}(2, 'foreach() argum...', 'D:\\laragon\\www\\...', 172) #1 D:\laragon\www\[sitename]\site\assets\cache\FileCompiler\site\modules\TracyDebugger\tracy-2.10.x\src\Tracy\Bar\Bar.php(143): ConsolePanel->getPanel() #2 D:\laragon\www\[sitename]\site\assets\cache\FileCompiler\site\modules\TracyDebugger\tracy-2.10.x\src\Tracy\Bar\Bar.php(115): Tracy\Bar->renderPanels('') #3 D:\laragon\www\[sitename]\site\assets\cache\FileCompiler\site\modules\TracyDebugger\tracy-2.10.x\src\Tracy\Bar\Bar.php(89): Tracy\Bar->renderPartial('main') #4 D:\laragon\www\[sitename]\site\modules\TracyDebugger\tracy-2.10.x\src\Tracy\Debugger\DevelopmentStrategy.php(123): Tracy\Bar->render(Object(Tracy\DeferredContent)) #5 D:\laragon\www\[sitename]\site\assets\cache\FileCompiler\site\modules\TracyDebugger\tracy-2.10.x\src\Tracy\Debugger\Debugger.php(314): Tracy\DevelopmentStrategy->renderBar() #6 [internal function]: Tracy\Debugger::shutdownHandler() #7 {main} And this is what the debug bar looks like: I think it should be a simple fix - it looks like the line 172 is traversing $p->fields, but $p is a NullPage at this point. Kind regards, Ian.
  3. I've recently started moving some of my PW sites over to 20i.com after becoming disenchanted with my current host. I've found their systems to be performant and reliable and their support to be really helpful and responsive (although they've recently adopted an AI bot intermediary for support questions - which to be fair is quite good, and if it doesn't answer your question you can get straight through to tech support via a ticket). Support tickets are usually answered within a few minutes. They have a custom Control Panel rather similar to cPanel, which is fine; I've not encountered any problems with it. They provide a CDN by default and the handful of PW sites I've moved over are running perfectly happily. Their migration mechanism is a cinch (I'm migrating from cPanel). I've a couple of small cloud servers with them and I'm trying out the reseller offering at the moment. The only downside is that to use their free SSL certs you need to have your domain either hosted with them or if hosted elsewhere, to use their nameservers. For some of my clients that's a non-starter, so I may look at Krystal as well. HTH.
  4. Hi @adrian, No, I don't have Ghostscript installed; and I'm not sure about the fonts path thing - I'm no server expert.. I agree - I don't think it's worth you spending any more time on this unless other people report similar issues. I have a good workaround thanks to your input, so that's very much appreciated. Maybe I should rename the title of this post, given that we eliminated the logs panel as the source of the issue?
  5. Hi @adrian, It appears to be mainly queryformats() that's the culprit - this is taking 40-odd seconds when first run after a few minutes idle time ; though if I run getVersion() first (similarly after some idle time) the latter can take 20s or so. Most of the sites are running PHP 8.1.32 and the Imagick version details are as follows: Thanks, Ian.
  6. Hi @adrian, I've now narrowed it down to a couple of elements in the panel code. The main one is the Imagick code, which seems to be the one that creates the 45s delay if you don't visit a page for 5 minutes or so. https://github.com/adrianbj/TracyDebugger/blob/5e5d483a7f4d30c4e3f52c40921897a4603b6151/panels/ProcesswireInfoPanel.php#L264-L278 There's also some slowdown on the Apache modules section, though this varies and I can't quite put my finger on it, but sometimes takes a few seconds: https://github.com/adrianbj/TracyDebugger/blob/5e5d483a7f4d30c4e3f52c40921897a4603b6151/panels/ProcesswireInfoPanel.php#L230-L250 I commented both those sections out and re-enabled the ProcessWire Info panel and all its subsections (and the Logs panel) and pages are now loading reliably in less than 200ms. 👍 I don't know if there's anything you can (or should) do about this, given the highly specific nature of this environment, but at least I now have a workaround and can troubleshoot again without going for a cup of tea while the page loads! I'm happy to continue with further checks for you if necessary. Many thanks, Ian.
  7. Happy to, Adrian, though it will be tomorrow now. It's nearly midnight now here in Blighty! 😴
  8. Hi @adrian, Many thanks. I think your suspicions are correct. It looks like the Versions info that's causing the problem. I presume there's some caching going on here too? If I refresh the page within a few seconds, it loads fairly quickly, but if I leave it for a few minutes, I get the long delay and large ms count on the next page view. This is with everything disabled in Processwire Info except Versions Info. I wonder if it's something to do with the mySQL server version query? There have been a couple of mySQL updates in recent weeks/months and it certainly didn't used to behave like this. Cheers, Ian.
  9. OK, so here's a turn up for the books - it's not the Processwire logs panel that's the issue - it's the Processwire Info panel! I noticed that the ms/kb count on one page refresh seemed to be next to the Processwire Info, so I turned that off and bingo! Everything loads consistently in milliseconds! Even with the logs panel turned back on, the pages are loading really quickly. I think it's somehow a misplacement of the counts and they're ending up next to the wrong checkbox. I've been through some of my other sites on that server, all exhibiting the same issue; turned off Processwire Info and - consistent millisecond loading across all those sites. And here's a screenshot of one of them that might show the misplacement better (before I toggled the Info panel off): I think it's the ProcessWire Info here that's taking 17 seconds. So - I don't know why that should be, but at least that's something to work with 🙂 Regards, Ian.
  10. What's also interesting is that the Tracy Bar shows just a few hundred ms loading time, even though the page took 45s to load:
  11. Hey @adrian, Thanks for the quick response! In answer to your questions: Yes, that's what confused me as well - I thought unchecking the box and choosing 'sticky' would completely disable it, but after a minute or two (presumably after one or more of the files gets updated) the page slows down again and the ms/kb notification reappears, even though the box is still unchecked. This is reproducible. Some of my sites are quite busy so the logfiles are getting modified frequently. Yes, I copied the logfiles down to the dev so they'd be exactly the same in number and in size. The largest is 1.6Mb. There are quite a few logs (78 to be exact - though many of those are empty - I have a Cron job that prunes them to 30 days each night). Total size of all files is 6.1Mb. However, I deleted all the log files a short while ago to see what effect that would have - now there are only 11 that have been recreated since I did that - totalling 9.7kb. I've just gone back into the admin and the page took over 45 seconds to load, showing the counts even though that checkbox is 'sticky unchecked'!: No, in fact I'd reduced this to 10 lines to see if that would help. Ah, yes - that would probably explain why things seem quick again for a minute or two and then slow down. Thanks for all your help! Ian.
  12. .. Though I don't believe this is the issue - with Tracy disabled, loading the PW Setup=>Logs overview page is pretty much instant...
  13. Hi @adrian, I'm unsure what's going on here but for a while now on a specific host (it's a cPanel server) I've been experiencing severe slowdowns when Tracy is enabled and it seems to be related to the reading of the Processwire logs Info. It's a bit like the old problem from 2022 when reasonable numbers of logs / large log files were slowing the page loading down when the debug bar was enabled. The odd thing is, I don't have the same problem on my local dev environment, or indeed on a different host, so I'm not sure where to look to troubleshoot. The environment in question is: PW 3.0.200-3.0.229 (various sites with different PW versions) PHP 8.1.32 MySQL Server: 10.6.22-MariaDB Sometimes, depending on the site and the number of log files, it can take up to 45 seconds to load, even though I've disabled the Processwire Logs panel: Whereas the same site (with the same log files) on my dev environment (and similar sites hosted elsewhere) are fine, even with the PW logs panel enabled: So I'm thinking it's some setting on the server - perhaps something like Imunify360 - could this be scanning the log files every time they're loaded and that's what's slowing it down? If I disable Tracy entirely, the same pages load happily in milliseconds, so it's some combination of Tracy and this specific server environment. I tried to disable the Processwire logs (as per the first screenshot above) but that only seems to work for a minute or so, and then the long loading time reappears. Hoping you can point me in some direction to narrow this down.. 🙏 Thanks, Ian.
  14. Hi @bernhard, Thanks for the reminder. I'd forgotten about this, but you prompted me to take another look. Since my original post I've added RPB to a couple of other sites, and the trash icon shows up just fine for non-superusers. So it made me think this was a problem just with that one specific site. The site in question has a lot of templates and a much more granular set of permissions for the non-superuser (editor) role. I had the "page-delete" permission checked for that role, and then had certain templates where this was revoked, one of which was the home template: And when I unchecked that checkbox for the editor role, suddenly the trash icon appeared on all the RPB blocks. I guess I don't need that revoke, since I don't think you can delete the home page regardless. Anyway, that seemed to be the problem, and it's now working, so I'm happy ?. Wondering if this behaviour is because the RPB blocks are children of the home page, and whether that has a bearing on the issue. Regards, Ian.
  15. That's great, thanks @Robin S! Works perfectly. A bit stupid of me - looking back at my old code I did use hasField, but evidently changed it during some other troubleshooting and didn't realise/forgot to change it back ?. As usual, the problem was entirely mine, and when in doubt, read the instructions!!
×
×
  • Create New...