• Resolved parentcentralhq

    (@parentcentralhq)


    We get 408 Timeout error when using “Debug File Validation”. This is for files that have size >40MB (even though php.ini has a 100MB max size and appropriate memory setting). Files below this load fine. We’re on a AWS Lightsail instance

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Blobfolio

    (@blobfolio)

    Hi @parentcentralhq,

    Timeout errors can be difficult to diagnose and correct as they can happen for all sorts of different reasons. They can be caused by a lack of server resources, or any of a number of different configured limits. AWS is usually OK on the resource front, so most likely you’ll need to adjust one or more server settings (timeout limits, buffer sizes, chunk sizes, etc.), but unfortunately there is no one-size-fits-all solution; the only way to find the answer is to tweak-and-test until everything works.

    But that said, I would probably start by focusing on settings which affect the Request (upload) side of the equation rather than the subsequent handling and Response.

    Type validation in WordPress (with or without LOTF), typically only requires reading the first few bytes of a file, so big or small, the analysis cost winds up about the same.

    Uploads and transfers, though, do vary quite a bit based on the file size. If the server is set to expect a completed request in, say, 10 seconds, but uploading a large file takes 15 seconds, you’ll get a timeout error.

    For example, here is a breakdown of the timings from two different FLAC validation attempts on my own site:

    
    | SIZE   | SENDING | RESPONSE | 
    | 12.7MB |   2.14s |   0.931s |
    | 65.2MB |  15.45s |   0.748s |
    

    The larger file took almost 8x as long to reach the server, but the subsequent Response — i.e. WordPress doing its thing and telling me whether or not the files are “allowed” — was more or less the same for each.

    Thread Starter parentcentralhq

    (@parentcentralhq)

    Thanks for the response. We went on similar lines and were able to fix the issue by increasing timeout using the code below (so others can benefit)

    # file /opt/bitnami/apache2/conf/httpd.conf

    <IfModule reqtimeout_module>
    RequestReadTimeout header=20-40,MinRate=500 body=20-60,MinRate=500
    </IfModule>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘408 Timeout Error’ is closed to new replies.