Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: ediaz on October 03, 2011, 06:26:39 PM

Title: memcache in roundcube 6.0
Post by: ediaz on October 03, 2011, 06:26:39 PM
Hello I read about use memcached in ronduncube, but for me don't run..

There is anybody that use this feature? runs??? there is not documentation about it..

regards!
Title: memcache in roundcube 6.0
Post by: alec on October 04, 2011, 02:13:21 AM
I use it. 'imap_cache'='memcache' enables memcache for part of imap-related cache. 'session_storage'='memcache' enables memcache for session storage. And configuration of memcache location: 'memcache_hosts'=array( 'localhost:11211', '192.168.1.12:11211' );
Title: memcache in roundcube 6.0
Post by: ediaz on October 04, 2011, 06:04:23 AM
.. I use the same and get this error.



[30-Sep-2011 14:59:02 +0200]: DB Error: Memcache failure on host localhost:11211 in /dominios/pk25.com/www/intranet/roundcubemail-0.6/program/include/rcmail.php on line 370 (POST /intranet/roundcubemail/?_task=login&_action=login)
[30-Sep-2011 14:59:44 +0200]: DB Error: Memcache failure on host localhost:11211 in /dominios/pk25.com/www/intranet/roundcubemail-0.6/program/include/rcmail.php on line 370 (POST /intranet/roundcubemail/?_task=login&_action=login)

But I have the memcache config

pk25.com:/dominios/pk25.com/www/intranet/roundcubemail/logs# telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
get foo
END
VALUE foo 0 2
Title: memcache in roundcube 6.0
Post by: jsaathof on October 30, 2011, 08:42:48 AM
There is a problem with specific versions of memcached and the php-memcache module as can be read here (http://www.php.net/manual/en/memcache.delete.php). This is the logging of memcached when logging into roundcube:

-----
<36 new auto-negotiating client connection
36: Client using the ascii protocol
<36 incr __CONNECTIONTEST__ 1
>36 NOT_FOUND
<36 get gi59ib235ih5n87rrf6v4jk955
>36 END
<36 delete gi59ib235ih5n87rrf6v4jk955 1
>36 CLIENT_ERROR bad command line format.  Usage: delete [noreply]
<36 connection closed.
-----

I tried to install a correct version according to this page (I have memcached 1.4.5 and installed php-memcache 2.2.5) but this doesn't work either. I can't seem to find the code that deletes a specific key (I am not a PHP programmer). This code probably adds a TTL of 1 to the delete somehow. I want to remove this, or set the TTL to 0 which should also work. If someone has some insight about this, please let me know. This is driving me crazy.

Jurriaan
Title: memcache in roundcube 6.0
Post by: oldschool on November 08, 2011, 04:34:05 PM
Hi!

First of all this is a really great feature. Respect!


But i have noticed if the memcached is busy or hangs the roundcube fails at all!

Dear RC-Team, please think about of a fall-back option!
This would make the life a little bit easier in the 19" rack...
Thanks.


Rgds.
Title: memcache in roundcube 6.0
Post by: ediaz on December 14, 2011, 05:21:01 PM
I solve this using:

apt-get install memcachedb

and change the config to..

$rcmail_config['memcache_hosts'] = array( 'localhost:21201');

regards!!1
Title: memcache in roundcube 6.0
Post by: oldschool on December 15, 2011, 02:54:41 PM
@ediaz

Hi!

Nice to hear you got it running.
But i don't get the deeper sense of your post...
Title: Need memcache extension 3.0.6+
Post by: jafcobend on December 19, 2011, 05:33:04 PM
I had this problem too. I dug around and this is apparently due to a change in the memcached protocol on servers >=1.3.0. I installed the beta version 3.0.6 of the memcache PHP extension and it fixes the delete command error, which then allows RoundCube to work.