简体   繁体   中英

Slow Http Request handling in arangodb

My foxx application gets data in parrallel (about 5-6 http connection). I also have a simple url which just have console.log('I am called') . I have 4 core and 16gb of memory. I am noticing that sometimes the following logs takes from 1 second to more than an hour to print

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.

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:

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. Can you edit your question how to reproduce this?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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