memcached

Memcached on Windows Failed to ignore SIGHUP: No error failed to daemon() in order to daemonize

偶尔善良 提交于 2019-12-10 13:44:57
问题 I'm trying to install memcached from: http://blog.elijaa.org/index.php?post/2010/10/15/Memcached-for-Windows&similar When I try to run it with the -d command line option I get the following error: Failed to ignore SIGHUP: No error failed to daemon() in order to daemonize When I run it without -d it appears to run normally, but I need -d to install it as a service... I've tried the following tutorials but they don't explain how to solve this. http://shiki.me/blog/installing-memcached-for-php-5

linux memcached 状态查询

风流意气都作罢 提交于 2019-12-10 13:31:32
如何查看memcache服务器端版本: ./memcached -h memcache 的运行状态可以方便的用 stats 命令显示。 首先用telnet 127.0.0.1 11211这样的命令连接上memcache,然后直接输入stats就可以得到当前memcache的状态。 这些状态的说明如下: pid memcache服务器的进程ID uptime 服务器已经运行的秒数 time 服务器当前的unix时间戳 version memcache版本 pointer_size 当前 操作系统 的指针大小(32位系统一般是32bit) rusage_user 进程的累计用户时间 rusage_system 进程的累计系统时间 curr_items 服务器当前存储的items数量 total_items 从服务器启动以后存储的items总数量 bytes 当前服务器存储items占用的字节数 curr_connections 当前打开着的连接数 total_connections 从服务器启动以后曾经打开过的连接数 connection_structures 服务器分配的连接构造数 cmd_get get命令(获取)总请求次数 cmd_set set命令(保存)总请求次数 get_hits 总命中次数 get_misses 总未命中次数 evictions

Memcached consistent hashing not working with 3 of 4 servers down

点点圈 提交于 2019-12-10 12:37:22
问题 Story I have 3 memcached servers running where I shutdown the one or the other to investigate how PHP-memcached behaves upon a server not beeing reachable. I have defined 4 servers in PHP, 1 to simulate a server that is mostly offline (spare server). When I shutdown 1 server (=> 2 are still online), the third ->get() gives me a result. When I shutdown one more server (=> 1 is still online), it won't find objects pushed to that last server. Sample output First run, 3 of 4 servers up: Entity

Linux下给php7安装memcached扩展的步骤

人走茶凉 提交于 2019-12-10 11:32:21
Memcached是一个自由开源的,高性能,分布式内存对象缓存系统;Memcached是以LiveJournal旗下Danga Interactive公司的Brad Fitzpatric为首开发的一款软件。现在已成为mixi、hatena、Facebook、Vox、LiveJournal等众多服务中提高Web应用扩展性的重要因素。 搞这个扩展用了不少时间,之前都是非常快的安装上了。网上搜索了不少文章,多数都是东抄西抄,没法解决问题。 综合了几个文章,终于搞定,这里记录下步骤: 安装memcached yum -y install memcached 安装完以后执行如下操作: chkconfig memcached on /etc/init.d/memcached start 执行 netstat -tunlp | grep memcached 看到11211端口,说明memcached安装成功。 安装libmemached wget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz tar -zxvf libmemcached-1.0.16.tar.gz cd libmemcached-1.0.16 ./configure -prefix=/usr/local

Optimize SELECT … WHERE IN (…)

淺唱寂寞╮ 提交于 2019-12-10 11:12:01
问题 I'm receiving a sequence of product IDs from external system. I have to show the product information preserving the sequence. I'm using the following select to do so: SELECT * FROM products WHERE prodid in (10331,11639,12127..) ORDER BY Field(prodid, 10331,11639,12127...); Sequence can consist of 20 IDs. prodid has b-tree index. It's very frequent query, and I'm trying to find ways to improve performance of that part of the system. Now the average time for this query is 0.14-0.2 sec I would

Broken pipe error in rails with memcached

纵饮孤独 提交于 2019-12-10 10:58:33
问题 I keep running into this error MemCacheError (Broken pipe): Broken pipe on my Rails app and I can't figure out why. When I access memcached via Rails.cache in my controller, the first 1 or 2 read/writes always seems to throw the broken pipe error. But when I access memcached by creating a new object, ActiveSupport::Cache::MemCacheStore.new , I don't seem to get this error. I also access memcached in another ruby process, and the first read always has this error regardless of the way I access

CacheManager memcached configuration

拥有回忆 提交于 2019-12-10 10:48:51
问题 I'm going to use CacheManager for my .net project. The problem is that I can't find any examples of CacheManager.Memcached usage. This is how I use it: public class GlobalCache { private static ICacheManager<object> memcachedClient { get; set; } private static readonly object locker = new object(); static GlobalCache() { if (memcachedClient == null) { lock (locker) { memcachedClient = CacheFactory.Build("memcached", settings => settings.WithMemcachedCacheHandle("memcached")); } } } } Web

php ini change local value

巧了我就是萌 提交于 2019-12-10 10:39:13
问题 I just setup php55 with apache on CentOS. I am also running Couchbase to handle memcached sessions. I have one server running fine. The other keeps trying to save php sessions locally. Not sure why. The php config has session.save_handler=memcached and session.save_path="cb.path:11211" The phpinfo page still lists the temp session path as the "local" option and the handler to files, but get_session_save_path() returns the couchbase url. How do I find where the local value is being set? 回答1:

Use NoSQL in MySQL

青春壹個敷衍的年華 提交于 2019-12-10 10:27:07
问题 I've noticed MySQL could use Memcached NoSQL with InnoDB but I can't retrieve information about how to use it. I want to use with PHP. Are NoSQL queries standard? 回答1: First of all, MySQL only support memcached with NoSQL since version 5.6. Today this version it's not update yet in linux repositories and must be manually installed, specially in servers, e.g. MySQL --version (ubuntu) is 5.5.38 ; (RedHat server) 5.1 You also must install libevent-dev e.g: Still some hacks are needed, and you

学习linux的第五十七天

烈酒焚心 提交于 2019-12-10 08:27:33
NoSQL介绍 NoSQL数据库的四大分类 键值(Key-Value)存储数据库 这一类数据库主要会使用到一个哈希表,这个表中有一个特定的键和一个指针指向特定的数据。Key/value模型对于IT系统来说的优势在于简单、易部署。但是如果DBA只对部分值进行查询或更新的时候,Key/value就显得效率低下了。[3] 举例如:Tokyo Cabinet/Tyrant, Redis, Voldemort, Oracle BDB. 列存储数据库。 这部分数据库通常是用来应对分布式存储的海量数据。键仍然存在,但是它们的特点是指向了多个列。这些列是由列家族来安排的。如:Cassandra, HBase, Riak. 文档型数据库 文档型数据库的灵感是来自于Lotus Notes办公软件的,而且它同第一种键值存储相类似。该类型的数据模型是版本化的文档,半结构化的文档以特定的格式存储,比如JSON。文档型数据库可以看作是键值数据库的升级版,允许之间嵌套键值。而且文档型数据库比键值数据库的查询效率更高。如:CouchDB, MongoDb. 国内也有文档型数据库SequoiaDB,已经开源。 图形(Graph)数据库 图形结构的数据库同其他行列以及刚性结构的SQL数据库不同,它是使用灵活的图形模型,并且能够扩展到多个服务器上。NoSQL数据库没有标准的查询语言(SQL)