1
votes

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.

1
No. We are using Ubuntu AWS r3.xlarge Instances. - Deepak Agarwal
you're using the windows environment you were talking about in that other question? and using tracelog while you observe this? Ok, sorry for mixing this thread up ;) - dothebart
Hi @deepak-agarwal, any more news on this? Did you work it out? or is there a way to reproduce this? - dothebart
I moved one of the scheduled jobs to run only at midnight instead of every hour. I think that was locking the collection. I am not noticing this problem now. But, I still believe there is some locking issue. Because I really noticed the http request being delayed for more than 30 min sometimes and then getting timed out (and those http requests just process a simple message on console) - Deepak Agarwal
I couldn't reproduce it anymore. - Deepak Agarwal

1 Answers

2
votes

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?