• Resolved Bruno Rodrigues

    (@brunojti)


    AAM is causing a huge slow down in my website.
    It has 20-25k items and when I try to access the CPT page in admin panel, PHP’s timeout occurs. (In my production environment: 1cpu, 512ram, digital ocean).

    In my local environment (vagrant with 4cpus, 2gb ram) using the same DB, the same page takes 27seconds to load.

    If I disable AAM in:
    * Local env: load time drops to 2-3 secs
    * Production env: page loads in 5secs.

    From debug.log in production:
    [17-Jul-2017 20:41:53 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/xxxxxxxxxxx/wp-content/plugins/advanced-access-manager/Application/Core/API.php on line 379

    Thanks for this amazing plugin!!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author AAM Plugin

    (@vasyltech)

    Hi @brunojti,

    Thank you for the feedback. It is possible as AAM adds additional overlay on top of the data processing to check if requested content is allowed or not.

    There are few things that you can do to optimize your site.

    First, if you are not restricting access to your backend or frontend sides, then you can turn off those features on the Utilities tab. This will improve your site speed.

    Second option is to turn off “Check post visibility” option if you are not using LIST option to hide any post, page or custom post type. This is the most resource consuming procedure as it triggers check for each fetched by WordPress core post. For more information about this please refer to this article https://aamplugin.com/help/how-does-aam-inherits-access-settings. After reading this article you might realize how much work is happening behind the scene, especially if you have a lot of hierarchical taxonomies.

    Finally if you are using LIST option, you can reduce the default number of posts that AAM is trying to cache per request (which is 500 by default). For that purpose, go to Extensions and install ConfigPress extension from the Free section. Then go to the ConfigPress tab and enter next configuration:

    [aam]
    get_post_limit = 20

    This will tell AAM to process only 20 posts per request and it might significantly improve your website performance.

    Keep me updated.
    Thank you,
    Vasyl

    Thread Starter Bruno Rodrigues

    (@brunojti)

    How can I turn off “Check post visibility”?

    Digging around your code, I noticed that there is a block (if) @ Filter.php:61.
    But I could not find an option to disable it.
    P.S. When I comment the conditional mentioned above my load time drops significantly.

    Plugin Author AAM Plugin

    (@vasyltech)

    @brunojti,

    You can turn off the “Check post visibility” on the Utilities tab.

    Thank you,
    Vasyl

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘20k posts – Unusable’ is closed to new replies.