Squid error - The request or reply is too large



  • Dear all,
    while trying to post on a specific website the below error is occurring
    this is a PHP based site and the data I'm trying to submit can't be too big - it's just some text and some check boxes + sometimes a 44KB word document.

    I've not been able to find a solution
    PFSENSE 2.0-RELEASE (i386) with "squid 2.7.9_4.2"  on Transparent proxy mode
    1GHZ CPU with 1GB of ram
    could somebody please help?

    Thanks
    Oren

    "The following error was encountered:
    The request or reply is too large.

    If you are making a POST or PUT request, then your request body (the thing you are trying to upload) is too large. If you are making a GET request, then the reply body (what you are trying to download) is too large. These limits have been established by the Internet Service Provider who operates this cache. Please contact them directly if you feel this is an error."



  • so many views and not a single reply? :(



  • can you whitelist that site? if that helps.



  • Hello Metu69salemi,
    thanks for your reply.

    i did try that but it didn't help



  • If you bypass your clients source IP address in squid and then post in this forum, does it work ?

    But you could read these three links:
    http://man.chinaunix.net/newsoft/squid/Squid_FAQ/FAQ-11.html#ss11.52
    http://www.squid-cache.org/Versions/v2/2.7/cfgman/reply_header_max_size.html
    http://www.squid-cache.org/Versions/v2/2.7/cfgman/request_header_max_size.html

    You can enter these parameters in squid custom options - I think.



  • hi Nachtfalke
    thanks for your reply
    adding an IP to the Unrestricted IPs does not help with this issue
    mind you, the data does pass ( or so i hope) as i do get a confirmation email in return ( in both cases)
    but the error page is still being presented.

    could you kindly direct me to the folder i am to look for the conf files to try the links you have provided?

    Regards



  • Just got to pfsense GUIU
    Services -> Proxy server -> General Settings
    Scroll down to "Custom squid options"

    enter these lines:

    # DEFAULT;
    # request_header_max_size 10 KB;
    request_header_max_size 64 KB;
    # DEFAULT;
    # reply_header_max_size 20 KB;
    reply_header_max_size 64 KB;
    

    The lines beginning with a "#" are just comments.

    Click Save - wait - clear all your states in firewall (DIAGNOSTICS -> State -> Reset States"

    Try again.



  • hi Nachtfalke
    thank you for your help,
    i did not know i could add my own commands to the squid in PFSENSE - noted!

    i have updated the PFSENSE configuration and will post back here if it worked or not as soon as i have the possibility to post again on that site.

    Regards
    Oren

    *this is the conf i have added:

    DEFAULT;

    request_header_max_size 10 KB;

    request_header_max_size 64 KB;

    DEFAULT;

    reply_header_max_size 20 KB;

    reply_header_max_size 64 KB;
    request_body_max_size 50 MB;
    reply_body_max_size 50 MB;



  • @oren256:

    hi Nachtfalke
    thank you for your help,
    i did not know i could add my own commands to the squid in PFSENSE - noted!

    i have updated the PFSENSE configuration and will post back here if it worked or not as soon as i have the possibility to post again on that site.

    Regards
    Oren

    *this is the conf i have added:

    DEFAULT;

    request_header_max_size 10 KB;

    request_header_max_size 64 KB;

    DEFAULT;

    reply_header_max_size 20 KB;

    reply_header_max_size 64 KB;
    request_body_max_size 50 MB;
    reply_body_max_size 50 MB;

    Hi,

    please delete the following two lines:

    request_body_max_size 50 MB;
    reply_body_max_size 50 MB;
    

    They will limit your max upload and download size limit. So if you like to download a file larger than 50MB than this could lead to an "invalid request". by default the value is "0" and this means "no limit".

    Just use this:

    # DEFAULT;
    # request_header_max_size 10 KB;
    request_header_max_size 64 KB;
    # DEFAULT;
    # reply_header_max_size 20 KB;
    reply_header_max_size 64 KB;
    

    Or to really make sure that there is no limit add this:

    request_body_max_size 0 KB;
    reply_body_max_size 0 KB;
    


  • thanks Nachtfalke
    i have changed the settings and also just had to post something there
    worked fine
    thanks a mil for your help!

    Oren


Log in to reply