gzip error

hello, in this website i can't activate the gzip compression and the browser cache.
it is using a lot of ram also.
all the websites are hosted in the same vps and only this one is facing this error.
also i am facing socket time outs

  • Adam Czajczyk

    Hello Carlos

    I hope you're well today and thank you for your question!

    The gzip compression is a server-side thing, it's performed by webserver (Apache in this case) and Hummingbird only enables and configures it. I'd usually suggest starting with checking with the host if necessary modules are enabled in Apache but since you got other sites hosted on the very same VPS and it's working there, I think we can rule this out.

    It doesn't seem to be a "false alarm" too as checking the site from outside seem to confirm there's no compression going on currently so the next step would be to check .htaccess file:

    - first please check if it's actually writeable (plugin must be able to write to it to add some rules to configure compression); you can do it by checking file permissions via FTP, SSH or some sort of control panel (if you do have one and there's any "File Manager" tool) - see if permissions are like 644 or 655 or higher numbers; if it's e.g. 444 it would mean that file is not writeable and Hummingbird cannot configure compression

    - second, please take a look into the file itself and see if these rules are there:

    <IfModule mod_deflate.c>
    	SetOutputFilter DEFLATE
        <IfModule mod_setenvif.c>
            <IfModule mod_headers.c>
                SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
                RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
        <IfModule mod_filter.c>
            AddOutputFilterByType DEFLATE "application/atom+xml" \
                                          "application/javascript" \
                                          "application/json" \
                                          "application/ld+json" \
                                          "application/manifest+json" \
                                          "application/rdf+xml" \
                                          "application/rss+xml" \
                                          "application/schema+json" \
                                          "application/vnd.geo+json" \
                                          "application/vnd.ms-fontobject" \
                                          "application/x-font-ttf" \
                                          "application/x-font-opentype" \
                                          "application/x-font-truetype" \
                                          "application/x-javascript" \
                                          "application/x-web-app-manifest+json" \
                                          "application/xhtml+xml" \
                                          "application/xml" \
                                          "font/eot" \
                                          "font/opentype" \
                                          "font/otf" \
                                          "image/bmp" \
                                          "image/svg+xml" \
                                          "image/vnd.microsoft.icon" \
                                          "image/x-icon" \
                                          "text/cache-manifest" \
                                          "text/css" \
                                          "text/html" \
                                          "text/javascript" \
                                          "text/plain" \
                                          "text/vcard" \
                                          "text/vnd.rim.location.xloc" \
                                          "text/vtt" \
                                          "text/x-component" \
                                          "text/x-cross-domain-policy" \
        <IfModule mod_mime.c>
            AddEncoding gzip              svgz

    Let me know, please, and based on this we'll then decide what to do next to solve this.

    As for RAM usage and socket errors. The gzip compression itself is not performed by Hummingbird so whether it's enabled or not it will not affect how big impact Hummingbird has on server resources. The compression itself, while it can speed up the site slightly, isn't usually a factor that could be critical to this. Therefore, I'd say we are dealing with an additional issue here.

    Having that said, I understand that you're experiencing that with this site only and other sites on the same server are fine, right? Are there any significant differences in configuration of these sites or are they all similar? Is it something that started to happen just recently (and if so, can you recall any changes made to the site prior to this) or it's an "ongoing" issue? Also, did you spot any "pattern" regarding this or it "just happens" every now and then?

    Looking forward to your reply,

  • Carlos

    Hi Adam, thanks a lot for your response.
    The gzip issue has been solved. (i needed to put your lines in the .htc) but the browser caching isn`t ready yet.
    Related to the socket time out and the Ram issue i can tell you that all of my websites are in the same vps (i'll add the server info), since i am not a developer neither have one i'm not very well prepared in this matter.
    During the last 10 days i've been receiveing mails from muchingbird telling me my websites are down.(one by one, i receive like 15 mails, one of each website) I asked the host company and they tell me that there is no support on vps plans but they tell me the problem was with the ram usage.
    I think enqueretaro.net is the most heavy site. Also the site elpuntodigital.com has been edited during this time.
    One of your mates via chat help me increasing apache's timeout from 300 to 600

  • Predrag Dubajic

    Hi Carlos,

    Have you already tried adding browser caching rules to your .htaccess?
    You should add below rules in there, restart apache after that and it should do the trick:

    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A0
    <FilesMatch "\.(txt|xml|js)$">
    ExpiresDefault A691200
    <FilesMatch "\.(css)$">
    ExpiresDefault A691200
    <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$">
    ExpiresDefault A691200
    <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$">
    ExpiresDefault A691200
    <IfModule mod_headers.c>
      <FilesMatch "\.(txt|xml|js)$">
       Header set Cache-Control "max-age=691200"
      <FilesMatch "\.(css)$">
       Header set Cache-Control "max-age=691200"
      <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$">
       Header set Cache-Control "max-age=691200"
      <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$">
       Header set Cache-Control "max-age=691200"

    Did increasing timeout help out with the site going down?

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.