`
langzhe
  • 浏览: 278565 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
分析 mnesia 索引慢的问题,结果出乎意料. 因为 ejabberd 设计思路对 mnesia 做缓存情有独钟。 排除 cowboy 系统本身性能问题之后决定分析代码。 前段时间对Cloud做压力测试意外发现,当测试将要结束时,从出现socket断开开始系统 ...
  查询时 用日期查  select first(0x00060001) as 0x00060001 from update_gadget_attr group by time(12h) fill(null) where time >'2015-05-21 00:00:01' and time < '2015-05-21 23:00:00' and gadget_id='e346d10a10bdc186b62cdd4f3e2298c8df254204' 结果结果正确返回2条记录 郎知  17:09:35 如果用 秒查询 select first(0x00060001) ...
  添加好友时, set roster是可选的。只发送 type=subscribe的presence即可。 set roster 也只是为了添加昵称和分组用的 有同事问起,结果忘记了,就又翻阅了一下文档,如下描述 Implementation Note: Many XMPP clients prompt the user for information about the potential contact (e.g., "handle" and desired roster group) when generating an outbound presence s ...

keepalive

{keepalive, Boolean}(TCP/IP sockets) Enables/disables periodic transmission on a connected socket, when no other data is being exchanged. If the other end does not respond, the connection is considered broken and an error message will be sent to the controlling process. Default disabled.   在ke ...
  %% The request  of POST113     Form = mochiweb_request:parse_post(Req),       %%  The request of GET 113     Form = mochiweb_request:parse_qs(Req),       %% The file  upload  79     Form = mochiweb_multipart:parse_form(Req),  80     ?DEBUG("~p:~p sss length(Form)=~p", [?MODULE, ...
201 Form = mochiweb_request:parse_qs(Req), %% 获取GET请求的参数 202 Server = get_bin(proplists:get_value("server", Form, "wx.com")), 203 [Version, Desc] = odbc_upload_apk:get_version(Server), 204 ?DEBUG("~p:~p Desc=~p", [?MODULE, ?LINE, Desc]), 214 ...
%%% Garbage collection may take far longer to trigger for 100,000 refc binaries %%% than for far fewer non-counted binaries, or may just as well never happen. %%% In this case, the memory is never reclaimed and we have a leak. %%% %%% There exist decent work-arounds for this -- fiddling with hi ...

Erlang内存分布

此文来自:https://blog.heroku.com/archives/2013/11/7/logplex-down-the-rabbit-hole网站 The amount returned by erlang:memory/0-1 is the amount of memory actively allocated, where Erlang terms are laid in memory; this amount does not represent the amount of memory that the OS has given to the virtual machi ...
1> flush(). ok 2> Pid = self(). <0.32.0> 3> Pid ! 1 3> . 1 4> Pid ! 2. 2 5> Pid ! 3. 3 6> flush(). Shell got 1 Shell got 2 Shell got 3  刚学erlang时特别是在学习erlang socket编程时,有时候需要在shell下接收数据,当时自己写了一个receive 去一个个接收,有了flush()方法就不用那么麻烦了    erlang:process_info(p ...
 解决更新自定义代码riak重启问题   1、创建自定义代码目录 如/home/jason/work/huanyue/server/trunk/trend_riak 2、修改etc/app.config 文件添加自定义目录  73  %% Riak KV config  74  {riak_kv, [  75             {add_paths, ["/home/jason/work/huanyue/server/trunk/trend_riak/"]},  3、编译自定义目录下文件(官方指出编译此目录下的文件时需要与编译riak的erl版本相同) ...
我现在有一个这样的bucket id    followed_id    followr_id  1     lxw            jason       2     jason          lxw 3     langxw         jason 4     jason          langxw 要得到这样一组数据[1](统计粉丝数,当然粉丝数可以预先计算,不必每次都现查),当时看到代码里有现成的接口就直接调用了,当时还感觉这接口有问题,后面可能会用麻烦。果然现在查询数据总是超时。所以说无论如何不要想着偷懒,偷懒的结果只会让自己花更多的时间来弥补。 [ ...
解决"errmsg" : "exception: 'out' has to be a string or an object" map=function (){ for(var key in this){ emit(key, {count:1}); }} reduce=function (key, emits){ total=0; for(var i in emits){ total+=emits[i].count; } return{"count":total}; }   > r=db.runCommand({&quo ...

MongDb group操作

这几天看了mongdb权威指南这本书,但是我下载的最新的版本(mongodb-src-r2.4.5)。 有些例子执行不成功。 如下面: 1、一条都没有返回 初始化time为0, > db.runCommand({"group":{"ns":"stocks", "key":"day","initial":{"time":0},"$reduce":function(doc, prev){if(doc.time>prev.t ...
1、  =ERROR REPORT==== 9-Jul-2013::12:26:19 === trends_riak_query::find 37 Error={error, <<"{\"phase\":0,\"error\":\"[worker_limit_reached]\",\"input\":\"{<<\\\"collections\\\">>,<<\\\"1372612349298430\\\" ...
  昨晚我临时无意中参加了一个关于我们产品的2.3版本需求讨论的会议。 当我拿到一张40多个功能列表时,我蒙了。几乎所有的功能我之前一无所知。 只是利用其他时间从设计那边了解到这次UI似乎回到去年版本上去了。   ...
Global site tag (gtag.js) - Google Analytics