Thanks for your answer. The problem occurred on the frontend. I activated memcached and now it works quite well. Only with Firefox I notice that the problem continues to occur, sometimes it takes 5 seconds or more to load.
I mean, suppose that we have registered two ads to appear in the position before post. It would be great if these two ads could appear randomly, one first and the other later, each time we refresh the page.