Detailed Request Logging, Not Working

What is likely to have happened here is that the data was recorded and was sent to your mongo DB.

However, MongoDB when it does a query over a range will try to load the entire working set into memory if there is not enough ram for the query then it willy ale a long time and potentially time out.

Since detailed logging generates massive amounts of data your tyk_analytics collection will balloon and take most of your available ram, causing simple queries to fail.

Now the tyk_analytics collection where this data is stored is only used for complex queries and the log browser, not for aggregate high level views used in other parts of the dashboard.

This means that the collection can be safely converted to a capped collection, which will basically turn it into stack where old records are discarded as the cap is reached.

Converting to a capped collection means that you will no longer have the timeouts if the cap is smaller than your RAM.

To convert to a capped collection is pretty easy:

M.

1 Like