2013年11月29日

nodejs coffee cluster process execPath

摘要: 今天做项目coffee启动的时候,如下报错:调试发现是因为模块中用了cluster,去掉cluster一切正常。猜想主进程应该是没有问题的,那么报错出在fork出来的进程中。从网上获知:cluster.forkcallschild_process.forkon the running module.child_process.forkruns the module withprocess.execPathwhich is coming out to/usr/bin/node. In other words,clusteris trying to run the workers withnode 阅读全文

posted @ 2013-11-29 15:28 magic.xiao 阅读(1370) 评论(0) 推荐(0)

redis key 过期时间

摘要: redis key 过期时间:EXPIRE key 100设置了过期时间,100秒后,key将自动被删除。过期时间删除的方法有三种:1、删除这个key,使用del command2、用set or getset 命令会将key的expiration清空,事实上set和getset命令是替换了key对应的value,所以key的过期时间也就不复存在。所以,需要注意的是:incr,LPUSH,HSET命令是不会改变key的过期时间的。原来是多久,这三条命令执行完之后还是多久。3、使用persist命令清楚key的过期时间。rename命令是将keyA变为keyB,无论keyB是否已经存在,keyA 阅读全文

posted @ 2013-11-29 00:05 magic.xiao 阅读(27890) 评论(0) 推荐(0)

导航