Support

Admin Tools

#28823 AdminTools AJAX Loading Error

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by on Friday, 05 January 2018 17:17 CST

paulcu
Nicholas,

I read through and applied your recommendations outlined in issue #25724 – AdminTools AJAX Loading Error but am still cannot get a successful PHP Scan report.

The log file is writable and the config was changed to match your recommendation but I still get an error.

Any additional thoughts?

paulcu
Nicholas,

I spoke with the hosting provider and they told me that the PHP Scan was exceeding the 25% CPU Usage limit. We monitored it live and were seeing usage ranging from 10% to 45% with occasional bursts as high as 89%

They suggested running the scan at off peak times but is it possible to tweak the config settings to minimize the error?

nicholas
Akeeba Staff
Manager
Scanning the entire site's content is, by its very nature, a CPU, memory, database and disk intensive operation. We have to go through every single file of your site, find our which ones are PHP files, read their contents, run a number of complicated pattern matches on each one of them, calculate differences with the contents stored in the database and record the results. That is a lot of work.

We can try to make the scan run with a smaller overall impact on the system by applying a duty cycle. Think of it as something like 1 second of scanning, 4 seconds of sitting on its hands doing nothing at all. This will make the scan just over 5 times slower (there's some overhead jumping from idle to scanning, that's why it's not exactly 5x slower). However, the peak CPU usage (burst) will still be close to 100% since you cannot possibly apply a duty cycle to the pattern matching itself: the bulk of its CPU usage occurs inside a built-in PHP function which effects the pattern matching and which, from the perspective of our code, is akin to a black box.

Here is what you can do to make it a bit better.

Go to PHP File Change Scanner page and click on the blue Configure button. Under Fine Tuning set:
  • Minimum execution time: 5 seconds
  • Maximum execution time: 2 seconds (yes, the maximum is less than the minimum, you read this correctly)
  • Runtime bias: 50%

This will have the scanner work for 1-2 seconds and sit back doing nothing for 3-4 seconds, implementing the roughly 20% duty cycle I discussed above.

If you don't mind making your life harder there's one more thing to do. Go to PHP File Change Scanner and click on the Options button in the toolbar. Set "Calculate diffs when scanning" to No. You will no longer see a difference of the current (on disk) version of each modified file to its previous version. You will just be told that the file was modified.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

paulcu
Nicholas—

Thank you for the great explanation. We'll play with it further here on our end—not sure about the making life more difficult but it might be a useful experiment just the same ;-P

~Paul

nicholas
Akeeba Staff
Manager
You're welcome :) Good luck!

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!