简体   繁体   English

Arangodb中的慢速HTTP请求处理

[英]Slow Http Request handling in arangodb

My foxx application gets data in parrallel (about 5-6 http connection). 我的foxx应用程序以并行方式获取数据(大约5-6 http连接)。 I also have a simple url which just have console.log('I am called') . 我也有一个简单的网址,其中只有console.log('I am called') I have 4 core and 16gb of memory. 我有4核和16GB内存。 I am noticing that sometimes the following logs takes from 1 second to more than an hour to print 我注意到有时以下日志需要1秒到一个多小时才能打印

2016-03-12T17:02:53Z [11944] INFO /evm, incoming request from 127.0.0.1: GET http://127.0.0.1:8529/_db/_system/app/analysis/getStats
2016-03-12T17:02:53Z [11944] INFO I am called

I can see the cpu utilization is about 20% and memory utilization is about 50% only. 我可以看到cpu利用率约为20%,内存利用率仅为50%。

Can you suggest what could be the reason and where should I work on. 您能否提出可能的原因以及我应该在哪里进行工作。

I tried to reproduce it with ArangoDB 2.8.5 like this using a sample foxx service: 我尝试使用样本foxx服务在ArangoDB 2.8.5中重现它:

controller.get('/', function (req, res) {
/*
  res.json(_.map(testRepo.all(), function (model) {
    return model.forClient();
  }));
*/
 console.log('I am called');

});

and tried to tease it with this tiny shell snippet: 并尝试用这个小小的贝壳片段来逗弄它:

for j in 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0  ; do \
  for i in `seq 1 100` ; do \
     curl -X GET --header "Accept: application/json" \
      "http://127.0.0.1:8529/_db/_system/test/test"  &\
  done; \
  sleep 2; \
 done 

but I see all loglines instantly appear in the arangodb logfile. 但是我看到所有日志行都立即出现在arangodb日志文件中。 Can you edit your question how to reproduce this? 您可以编辑您的问题如何重现吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM