• Resolved mattinventive

    (@mattinventive)


    Hi all,

    The plugin Media Libraries seems to be bringing our site to a grinding halt.

    It’s when the component MGMediaLibaryFolders::admin_check_for_new_folders is ran it seems to bring the websites down completely for around 8 minutes

    I’ve tried disabling the plugin, resetting it (using the reset plugin) then re-enabling but this hasn’t solved the issue.

    Here’s my environment:

    PHP Version: PHP7.4.
    Host: Pantheon
    Plugin Version: 8.0.5

    Any help would be greatly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter mattinventive

    (@mattinventive)

    Not sure if it makes a difference but for your ref the site has ~75,000 images.

    Plugin Author AlanP57

    (@alanp57)

    Having 75,000 images in a site’s media library might require a longer time for database queries to complete and website server limits the amount of time it can spend on a single task. This is know as the maximum execution time. It usually set at 30 seconds. There is a way that this time limit can be raised as is explained in the troubleshooting tips on the Support page of the plugin on your site:

    Fatal error: Maximum execution time exceeded

    The Maximum execution time error takes place when moving, syncing or uploading too many files at one time. The web site’s server has a setting for how long it can be busy with a task. Depending on your server, size of files and the transmission speed of your internet, you may need to reduce the number of files you upload or move at one time.

    It is possible to change the maximum execution time either with a plugin such as WP Maximum Execution Time Exceeded or by editing your site’s .htaccess file and adding this line:

    php_value max_execution_time 300

    Which will raise the maximum execution time to five minutes.

    Try raising the site maximum execution time.

    Thread Starter mattinventive

    (@mattinventive)

    Great this seems to have done the job so thank you for that.

    Using the plugin WP Crontrol I’ve lowered the CRON run frequency for admin_check_for_new_folders too to once per week, is this going to have any negative impact on the plugin would you know?

    Plugin Author AlanP57

    (@alanp57)

    The only problem is when WordPress adds a new folder and then a new file is uploaded to the folder. The plugin will not be able to update the database with the proper folder ID so the file will not be included when viewing the contents of the folder in the Media Library Folders. It is better to run admin_check_for_new_folders at least once per day.

    Thread Starter mattinventive

    (@mattinventive)

    Thanks Alan, appreciate it!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Media Libraries Bringing Site Down’ is closed to new replies.