Hi Dormando,

I found the error!  I just wanted to thank you wholeheartedly for all your
input.  Awesome.  Much appreciated.  You were 100% right i the end.
Silverstripe's caching mechanisms are a bit of a mess. I have raised a
ticket with them and my applications are working now.

YES!!!

Thank you for all your patience and help.  I really appreciated your help
and it helped me get through this dark period in my coding history ;-)))

THANK YOU - THANK YOU - THANK YOU

Nicolaas

On 8 December 2016 at 21:56, dormando <[email protected]> wrote:

> I just downloaded silverstripe:
>
> framework/thirdparty/Zend/Cache/Backend/Libmemcached.php:245 ->
>     public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags =
> array())
>     {
>         switch ($mode) {
>             case Zend_Cache::CLEANING_MODE_ALL:
>                 return $this->_memcache->flush();
>                 break;
> ^ calls flush(), which is probably flush_all, if you call clean() with no
> args. It doesn't seem to support any other arguments.
>
> $ grep -rn "\->clean(" * | wc -l
> 25
>
> clean is called a bunch of times for a bunch of reasons. You're probably
> hitting one of them every so often.
>
> Maybe you should start harassing the SilverStripe people for using
> memcached like it's 2005? While you're there; explain to them how tarballs
> work and to put their shit under a subdirectory.
>
> You'll get much better support from them than blaming the server over and
> over anyway. They're obviously doing completely lazy cache invalidation by
> flushing the entire server constantly. That's not how it was designed to
> be used at all.
>
> On Thu, 8 Dec 2016, dormando wrote:
>
> > What?
> >
> > crashing what server? what memory management?
> >
> > On Thu, 8 Dec 2016, Nicolaas Thiemen Francken wrote:
> >
> > > I had a search throughout the project and there is no mention at all
> of flush_all. I think it has something
> > > to do with memory management or some way we are crashing the server so
> it flushes itself.
> > >
> > > On 8 December 2016 at 21:31, dormando <[email protected]> wrote:
> > >       One of the libraries is calling a flush command somewhere for
> some reason.
> > >       I've no idea why it would do that offhand.
> > >
> > >       You can flatly disable cmd_flush via a startup option (find it
> in the
> > >       manpage; I can't recall it offhand), but it's probably worth
> finding out
> > >       what's doing that.
> > >
> > >       The command is called "flush_all" if that helps.
> > >
> > >       On Thu, 8 Dec 2016, Nicolaas Thiemen Francken wrote:
> > >
> > >       > ok, but how am I doing this? how can I change this?
> > >       >
> > >       > On 8 December 2016 at 21:26, dormando <[email protected]>
> wrote:
> > >       >       STAT cmd_flush 19612
> > >       >
> > >       >       you're flushing the cache constantly.
> > >       >
> > >       >       On Thu, 8 Dec 2016, Nicolaas Thiemen Francken wrote:
> > >       >
> > >       >       > Hi Dormando et al.
> > >       >       >
> > >       >       > I did a lot of testing and it definitely has nothing
> to do with the TTL as far as I
> > >       can see:
> > >       >       >
> > >       >      >See http://stackoverflow.com/questions/40964315/stop-
> memcache-from-removing-data-in-php-silverstripe-zend
> > >       -c
> > >       >
> > >       >       > ache for more details.
> > >       >       >
> > >       >       > Basically I have two test sites and two lives sites
> and I found that the busier the
> > >       site the
> > >       >       more likely it
> > >       >       > is that the cache key disappears. Is there anyway I
> can ping / find out how / if a
> > >       cache gets
> > >       >       flushed /
> > >       >       > cleared?
> > >       >       >
> > >       >       > On 8 December 2016 at 07:41, Nicolaas Thiemen Francken
> <[email protected]> wrote:
> > >       >       >       Hi Dormando,
> > >       >       >
> > >       >       > I am running the same code locally and it does not
> expire.  I have to check a few more
> > >       >       differences,
> > >       >       > but I am running an almost identical setup on my
> laptop and it appears to work fine.
> > >       >       >
> > >       >       > What I am going to do is to compare all the settings
> between the server and local dev
> > >       server
> > >       >       to see if
> > >       >       > there is anything different.
> > >       >       >
> > >       >       > On 7 December 2016 at 21:31, dormando <
> [email protected]> wrote:
> > >       >       >       The expirey isn't inside the item value. It's
> part of the protocol when
> > >       >       >       storing the item. It's not in the server
> configuration, it's in the
> > >       >       >       *client* making the actual store.
> > >       >       >
> > >       >       >       ie: You have your serialized blob ($data), and
> then you want to store it
> > >       >       >       into memcached, you make a call that looks like:
> > >       >       >
> > >       >       >       $client = PHPGarbage->new("127.0.0.1:11211")
> > >       >       >       $client->set($data, 6000, etc);
> > >       >       >       the TTL is not in the data, but in the argument
> to the set command. Some
> > >       >       >       PHP clients have confusing syntax and people put
> the TTL into the wrong
> > >       >       >       field.
> > >       >       >
> > >       >       >       Since you've listed a stack of software
> abstractions, you need to go find
> > >       >       >       out exactly what thing is actually running the
> set() command to memcached
> > >       >       >       and what it's using as a TTL argument. My wild
> guess is that you're not
> > >       >       >       specifying a value to the abstraction and it's
> using 30 as a default.
> > >       >       >
> > >       >       >       I know the TTL is 30 because I wrote this
> software and that's how it
> > >       >       >       behaves.
> > >       >       >
> > >       >       >       On Wed, 7 Dec 2016, Nicolaas Thiemen Francken
> wrote:
> > >       >       >
> > >       >       >       > Hi,
> > >       >       >       >
> > >       >       >       > Thank you again for your reply.
> > >       >       >       >
> > >       >       >       > Sorry but where or how do you know the TTL is
> 30?  I agree that items
> > >       disappear after
> > >       >       >       about 30 seconds, but where or how do I set the
> TTL for memcache?
> > >       >       >       >
> > >       >       >       > i have had a look in the memcached.conf file.
> There is no setting in there
> > >       that
> > >       >       relates
> > >       >       >       to expiry or TTL or similar.
> > >       >       >       >
> > >       >       >       > ​​In the item, you can also see that it is set
> to expire in 6000 seconds.
> > >       >       >       >
> > >       >       >       > The item basically has three pieces of info
> (serialised):
> > >       >       >       > 1. value
> > >       >       >       > 2. timestamp
> > >       >       >       > 3. seconds until expiry​
> > >       >       >       >
> > >       >       > > --
> > >       >       > >
> > >       >       > > ---
> > >       >       > > You received this message because you are subscribed
> to the Google Groups
> > >       "memcached" group.
> > >       >       > > To unsubscribe from this group and stop receiving
> emails from it, send an email to
> > >       >       > [email protected].
> > >       >       > > For more options, visit https://groups.google.com/d/
> optout.
> > >       >       > >
> > >       >       > >
> > >       >       >
> > >       >       > --
> > >       >       >
> > >       >       > ---
> > >       >       > You received this message because you are subscribed
> to a topic in the Google Groups
> > >       >       "memcached"
> > >       >       > group.
> > >       >       > To unsubscribe from this topic, visit
> > >       >       > https://groups.google.com/d/
> topic/memcached/7D3XO8yUxqk/unsubscribe.
> > >       >       > To unsubscribe from this group and all its topics,
> send an email to
> > >       >       > [email protected].
> > >       >       > For more options, visit https://groups.google.com/d/
> optout.
> > >       >       >
> > >       >       >
> > >       >       >
> > >       >       >
> > >       >       > --
> > >       >       > {    Nicolaas Thiemen Francken
> > >       >       >     www.sunnysideup.co.nz
> > >       >       >     +64 (0) 221 697577
> > >       >       > }
> > >       >       >
> > >       >       >
> > >       >       >
> > >       >       >
> > >       >       > --
> > >       >       > {    Nicolaas Thiemen Francken
> > >       >       >     www.sunnysideup.co.nz
> > >       >       >     +64 (0) 221 697577
> > >       >       > }
> > >       >       >
> > >       >       > --
> > >       >       >
> > >       >       > ---
> > >       >       > You received this message because you are subscribed
> to the Google Groups "memcached"
> > >       group.
> > >       >       > To unsubscribe from this group and stop receiving
> emails from it, send an email to
> > >       >       > [email protected].
> > >       >       > For more options, visit https://groups.google.com/d/
> optout.
> > >       >       >
> > >       >       >
> > >       >
> > >       >       --
> > >       >
> > >       >       ---
> > >       >       You received this message because you are subscribed to
> a topic in the Google Groups
> > >       "memcached"
> > >       >       group.
> > >       >       To unsubscribe from this topic, visit
> > >       >       https://groups.google.com/d/topic/memcached/7D3XO8yUxqk/
> unsubscribe.
> > >       >       To unsubscribe from this group and all its topics, send
> an email to
> > >       >       [email protected].
> > >       >       For more options, visit https://groups.google.com/d/
> optout.
> > >       >
> > >       >
> > >       >
> > >       >
> > >       > --
> > >       > {    Nicolaas Thiemen Francken
> > >       >     www.sunnysideup.co.nz
> > >       >     +64 (0) 221 697577
> > >       > }
> > >       >
> > >       > --
> > >       >
> > >       > ---
> > >       > You received this message because you are subscribed to the
> Google Groups "memcached" group.
> > >       > To unsubscribe from this group and stop receiving emails from
> it, send an email to
> > >       > [email protected].
> > >       > For more options, visit https://groups.google.com/d/optout.
> > >       >
> > >       >
> > >
> > >       --
> > >
> > >       ---
> > >       You received this message because you are subscribed to a topic
> in the Google Groups "memcached"
> > >       group.
> > >       To unsubscribe from this topic, visit
> > >       https://groups.google.com/d/topic/memcached/7D3XO8yUxqk/
> unsubscribe.
> > >       To unsubscribe from this group and all its topics, send an email
> to
> > >       [email protected].
> > >       For more options, visit https://groups.google.com/d/optout.
> > >
> > >
> > >
> > >
> > > --
> > > {    Nicolaas Thiemen Francken
> > >     www.sunnysideup.co.nz
> > >     +64 (0) 221 697577
> > > }
> > >
> > > --
> > >
> > > ---
> > > You received this message because you are subscribed to the Google
> Groups "memcached" group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> an email to
> > > [email protected].
> > > For more options, visit https://groups.google.com/d/optout.
> > >
> > >
> >
> > --
> >
> > ---
> > You received this message because you are subscribed to the Google
> Groups "memcached" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "memcached" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/memcached/7D3XO8yUxqk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
{
    Nicolaas Thiemen Francken
    www.sunnysideup.co.nz
    +64 (0) 221 697577
}

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to