• jure.mijic

    (@juremijic)


    Hi,
    on Windows server the cleanup does not delete the generated captcha images and answer files, the files build up and eventually every request to the website is slowed down because it tries do delete 10k files which are generated as read-only and it cannot delete them.

    Don’t know why this file mode is necessary, if they are created in 0755 mode they are normally deleted.

    /* Mode of temporary image files */
    $this->file_mode = 0444;

    /* Mode of temporary answer text files */
    $this->answer_file_mode = 0440;

    https://ww.wp.xz.cn/plugins/really-simple-captcha/

Viewing 4 replies - 1 through 4 (of 4 total)
  • This is probably why I get lots of errors when using WP Migrate DB Pro Media Files. It throws errors that it can’t delete the captcha images. It would be great if this could be changed 0755.

    I have just discovered, by running the P3 (Plugin Performance Profiler) plugin several times, that one of my WordPress websites that has started running slowly is being slowed down *significantly* by this ‘Really Simple CAPTCHA’ plugin. I am also on Windows hosting. The server response time to first byte was about 7 seconds, and after simply disabling the plugin, it was down to less than a second.

    I tried to delete all my captcha images and answer files to alleviate the plugin but keep it enabled, but they are all locked currently. So I have to disable the plugin until this problem is fixed.

    So, two issues:
    1) Sorting out deletion of the files on Windows servers
    2) More importantly, why does this slow down *every page* on my website, when the only page that has the ‘Really Simple CAPTCHA’ on a Contact Form 7 form is the Contact page? It definitely should not be slowing down the server! Why do plugin authors make their code run on every single page of a site, rather than on just the pages that need them? Not only that, can’t the issue of hundreds of captcha image/answers be dealt with at some point other than when the site loads eg. via a cron job?

    Any solution to this yet? I just installed and tried Really simple Captcha for the first time and am having the same problem – yes windows server.

    We have fixed this by making the following changes to the plugin file:

    File: /wp-content/plugins/really-simple-captcha/really-simple-captcha.php
    Line 71: $this->file_mode = 0644;
    Line 74: $this->answer_file_mode = 0640;

    As a results we can use this plugin on Windows Servers without a slow-down on the server or a build-up of captcha image files

    Woo!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Read-only files slowing down every request’ is closed to new replies.