Negative_Hit/404, Miss percentage is high than the hits



  • I have this error how can i fix it i am using squid..

    http://s3.postimg.org/5yxbzxow3/negative_hit.jpg



  • up for this!!



  • According to the Squid log docs, TCP_NEGATIVE_HIT means that it is caching a 404.  A previous GET attempt resulted in a 404 Not Found from the host server, and Squid knows about the 404 and caches it.  When there is a subsequent request for that element, Squid knows it's not really there and serves you a 404 without checking with the host server.



  • @KOM:

    According to the Squid log docs, TCP_NEGATIVE_HIT means that it is caching a 404.  A previous GET attempt resulted in a 404 Not Found from the host server, and Squid knows about the 404 and caches it.  When there is a subsequent request for that element, Squid knows it's not really there and serves you a 404 without checking with the host server.

    Sir KOM thank you for the reply.. so this mean squid is working but cant find found the file from the host server what is the possible cause of this?



  • The file can't be found because it likely isn't there.  Why isn't it there?  Ask the webmaster of garenanow.com.



  • Indeed, you're trying to hit a URL that doesn't exist, which has nothing to do with Squid or anything on your network.



  • @cmb:

    Indeed, you're trying to hit a URL that doesn't exist, which has nothing to do with Squid or anything on your network.

    Thanks for the reply.. what about the miss percentage is high compare to the hits?

    http://s29.postimg.org/qn2r0e5vr/pic.jpg



  • It's expected to get a lot of misses on a new cache, or any dynamic webpage.  Any caching server relies on timestamps or internal timeouts to determine the freshness of the requested content.  If the websites you're hitting are constantly updating their page/object timestamps or redirecting to numerous internal servers, this can cause a MISS on the cache and force Squid to reget the content, filling your cache with instantly stale data.  More often, Squid is used as the foundation for content filtering via SquidGuard or DansGuardian etc.  Using Squid as a cache will only really benefit you these days if you have a lot of users.



  • @KOM:

    It's expected to get a lot of misses on a new cache, or any dynamic webpage.  Any caching server relies on timestamps or internal timeouts to determine the freshness of the requested content.  If the websites you're hitting are constantly updating their page/object timestamps or redirecting to numerous internal servers, this can cause a MISS on the cache and force Squid to reget the content, filling your cache with instantly stale data.  More often, Squid is used as the foundation for content filtering via SquidGuard or DansGuardian etc.  Using Squid as a cache will only really benefit you these days if you have a lot of users.

    Thanks for the info.. I have a lot of users cause i use it in my internet cafe business..



  • Run a Lightsquid report and see what your Hit% is after a week or so of normal usage for your cafe.  That will tell you how effective Squid is being about caching content and saving bandwidth.