Get a free advice now!

    Pick the topic

    Developer OutsourcingWeb developingApp developingDigital MarketingeCommerce systemseEntertainment systems

    Thank you for your message. It has been sent.

    Tags

    Fix Sucuri Firewall protected WP Media Library upload error

    Fix Sucuri Firewall protected WP Media Library upload error

    CHALLANGE: After configuring Sucuri Firewall, WordPress Media Upload Library displays the following error (when trying to upload big images): “Unexpected response from the server”.

    SOLUTION: Increase SSL Buffer Size by adding the proper htaccess directive.

    With so many threats in cyberspace, having an effective means of protection is a must. Sucuri Firewall is one way of making sure your website is secure. This highly effective cloud-based protective barrier shields websites against SQL injections, brute force attacks, DDoS and many other disruptive and potentially dangerous issues.

    Despite being a trusted and reliable piece of software, a sucuri error might still occur. If you think you may have experienced a sucuri firewall error, have a look at the situation we describe below and follow our solution.

    WordPress was working correctly. There wasn’t any issue with adding new files to WP Media Library. We’ve setup Sucuri Firewall (WAF) to protect the website from DDoS attacks and secure it.

    Proper DNS records have been changed and Sucuri generated new SSL certificates (Let’s Encrypt).

    After “the switch” we started to experience random wp-admin Errors (when uploading files). For 10 successful WP Media Library uploads – there were always 2-3 errors: “Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.”.

    Error logs showed:

    [Thu Jun 30 12:37:25.823135 2020] [error] [pid 13635] ssl_engine_io.c(1899): [client xx.xxx.xxx.x:51062] AH02018: request body exceeds maximum size (131072) for SSL buffer
    [Thu Jun 30 12:37:25.823159 2020] [error] [pid 13635] ssl_engine_kernel.c(850): [client xx.xxx.xxx.x:51062] AH02257: could not buffer message body to allow SSL renegotiation to proceed

    It turns out that the SSL Buffer Size on the server is 128kb. So, if the request exceeds the size, the error will appear.

    The solution was to add a proper htaccess directive into the .htaccess file:

    # BEGIN fix for request body exceeds maximum size 
    SSLRenegBufferSize 104857600 
    # END

    More info: https://stackoverflow.com/questions/3718571/request-entity-too-large-php/

    That’s it for today’s tutorial. Be sure to follow us for other useful; tips and guidelines.

    Comments
    0 response

    Add comment

    Your email address will not be published. Required fields are marked *

    Popular news

    A game changer for WooCommerce users
    • Our Highlights

    A game changer for WooCommerce users

    March 24, 2023 by createIT
    The differences between a web app and a mobile app
    • Services
    • Technology
    • Trends

    The differences between a web app and a mobile app

    March 7, 2023 by createIT
    Webrooming and showrooming
    • Trends

    Webrooming and showrooming

    February 14, 2023 by createIT
    PHPStorm – fix long load time of a directory window
    • Dev Tips and Tricks

    PHPStorm – fix long load time of a directory window

    January 20, 2023 by createIT
    reCAPTCHA v3 – WordPress implementation
    • Dev Tips and Tricks

    reCAPTCHA v3 – WordPress implementation

    January 20, 2023 by createIT
    How to compare GIT and server files
    • Dev Tips and Tricks

    How to compare GIT and server files

    January 19, 2023 by createIT
    How to trigger a click event inside iframe?
    • Dev Tips and Tricks

    How to trigger a click event inside iframe?

    January 19, 2023 by createIT
    FOOEvents – generate a custom CSV report
    • Dev Tips and Tricks

    FOOEvents – generate a custom CSV report

    January 19, 2023 by createIT
    Headless chrome – testing webgl using playwright
    • Dev Tips and Tricks

    Headless chrome – testing webgl using playwright

    January 18, 2023 by createIT
    Preview big SQL files with PilotEdit
    • Dev Tips and Tricks

    Preview big SQL files with PilotEdit

    January 18, 2023 by createIT

    Support – Tips and Tricks
    All tips in one place, and the database keeps growing. Stay up to date and optimize your work!

    Contact us