Digging into this, is an exception not what we want here? It seems like if you ask it to use a cache, and the cache fails at saving, shouldnt an exception be thrown? Is this perhaps a situation that should be taken care of before table metadataSetup(), like in the bootstrap? Perhaps the bootstrap should detect if memcached is not available?

-ralph

Posted by Valera Leontyev (feedbee) on 2009-09-10T00:33:41.000+0000

Is it possible situation when memcached server fails after connection setting up? Yes. In that case if exception will be thrown we'll get unwanted break up. I want to see my scripts still working fine even in the case memcached doesn't work properly.

Posted by Michael Rehbein (tech13) on 2009-11-24T11:29:13.000+0000

If we really need to know the cache failed, wouldn't a throw from Zend_Cache be a better place then a throw from Zend_Db?

Alternatively, couldn't it just be a trigger_error(...., Notice) rather then a throw?

Posted by Valera Leontyev (feedbee) on 2009-11-24T23:35:45.000+0000

Really, notice is the best way to keep a web-master informed about cache subsystem problems and not to interrupt normal code execution later on.

after a few minutes (dont know on what it depends) no errors are thrown.. until the next memcached restart.

What i have to try sometimes is what if you configure more than one memcached server will a error thrown wenn only one of them is restarted.

In general i would also suggest to trigger a notice, a cache failure is not allowed to stop a, besides this, working page.

Posted by Ralph Schindler (ralph) on 2009-12-21T12:31:54.000+0000

If the memcached server is not available, it seems like Zend_Cache should throw an exception, no?

Then, when inside Zend_Db_Table, it should treat Zend_Cache as a (effectively) /dev/null cache, thus, it will always have to do the lookup on the metadata.

Or am I missing something?

Posted by Ken Chou (kenchou77) on 2009-12-21T18:59:34.000+0000

That's right.
Cache should be used to improve the performance of process, should not break the process.
The current version, even if we caught the exception thrown within Zend_Db_Table, we can not return to run as no cache.

I have the same setup setup as Juraj. Since updating to 10.0.2, a notice is thrown instead of an exception. This is nice, but I don't know why its being thrown. I'm guessing that it throws whenever the cache is old, but I need to setup better logs to see if this is really the case.

Any ideas for pinpointing the problem?

Posted by Michael Kliewe (mkliewe) on 2010-05-17T07:37:42.000+0000

I have a similar problem with memcached as metadatacache. I use the Zend_Session_SaveHandler_DbTable, and from time to time I get an exception saying that saving metadata failed (because Zend_Db_Table is used to save session data). As a result session_start() does not work. See log below.

I will now try to use a "non-persistent" connection to memcached.

I also had the problem in the past with restarting memcached:
Restart memcached -> access the page -> error -> reload -> working -> reload -> working or error
Since it is not an exception anymore the problem is gone.