Error handling for Memcached PHP Extension

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Before I start, I am not sure whether I should have sent this to
Memcached or PHP mailing list. So, for those who are subscribed to
both, I apologize.

I have started using the PHP extension at
http://pecl.php.net/package/memcache for memcached. But, one problem I
am having right now is that, php functions tells you nothing about
errors.

For example, when you call Memcache::get, it returns true or false,
but when it returns false does this mean item is not found, or
Memcached is down, or there is a cache corruption / compression error,
etc. etc. And, this also is the case for Memcache::set, again when it
returns false, you have no idea about what is going on. I tried
turning debugging on, and this did not help much.

As far as I can see, memcache internally sets error nos, but this
extension completely ignores this information. And, I saw something like:

"PHP Notice:  Memcache::get(): marked server 'localhost:11211' as
failed" in my php logs for some of the requests (like 5-10 out of a
thousand), but server was up, and everthing was normal, and the
request right after this one succeeded.

In summary, is it possible to get these errors from PHP somehow so
that we can have an idea about what is going on and how we can handle
them? Possibly with something like "mysql_error" or "mysql_errno"
functions?

Thanks in advance...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux