First of all, you do not need to use AJAX for every possible dynamic content, especially in the case of comments, you can load them through an iframe . This way you are not relying on Javascript for the request. It may even work for a counter.
However, the problem is not in Javascript, but in the database server, based on what I see in your graph. It seems to me that you have some heavy PHP controllers, maybe you are loading a heavy framework to check $session->id .
In addition, what do you mean by "we track every action"? How do you track them? Are you sending an AJAX request from every little thing, or are you going to discuss them with JS and send only once every 30 seconds?
My advice is that you consider the size of the PHP code you are calling, and reduce it as much as possible, even to zero, if possible (by using localStorage to track your user session after the first login) and possibly loading counter and comments in alternative ways.
For example, I conclude that you check the counter only once per page load, ignoring subsequent loads of other users when the current user reads the article, so your counter may be outdated after ia, depending on your traffic.
I'm going to explain this better: your page has n views, so when I load it, you request n and then display n + 1 for me. As I read, the same page is requested and viewed x times by other users. Your server counter has certainly been updated to n + x, but the counter on my page still says “n views”. So, what's the point of being picky and showing n + 1 for me and not updating it, thereby disconnecting from x?
So, first of all, the counter controller should be as thin as possible, and what if you loaded it into an iframe, automatic updating without AJAX?
How to update iframe without using javascript?
This will keep the counter up to date, you can display it using PHP only once to view the page, and then simply statically serve the resulting HTML file.