@@ -99,6 +99,31 @@ eliminates the extra load. On the one hand, it leads to extra error responses, b
9999on the other hand, it greatly lowers the timings of the rest of the database
100100requests and helps Mongo to return to the normal state with lower response timings.
101101
102+
103+ #### Mongo Congestion Control Activation Troubleshooting
104+
105+ If the Mongo CC for service is active (the service logs contain "Congestion Control DATABASE_NAME is active" and/or the
106+ metrics have ` mongo.congestion-control.is-enabled ` set) and the workload is usual for
107+ the service, then something is wrong with the database. Service or database maintainers should resolve the issue.
108+
109+ ** Steps to troubleshoot:**
110+
111+ 1 . Start by locating the requests that execute for a long time. Take a look at the
112+ ` mongo.by-[database|collection|operation].timings* ` metrics to locate the database, collection and operation that
113+ cause the most of the database load. Also take a look at the metrics that are reported by the Mongo database
114+ directly (not by the userver based service).
115+
116+ 2 . Ask your favorite WEB search engine or AI for an information on how to optimize the slow queries in MongoDB. Usually
117+ adding indexes or sharding the database does the job.
118+
119+ 3 . The slowdown could be caused by MongoDB sending megabytes of responses to your service on a slow connection:
120+ * Verify that the application logic is optimal, no unnecessary data is retrieved
121+ * Minimize network interactions with @ref components::MongoCache.
122+
123+ 4 . If most of the queries run slowly or all of the queries take similar time, then the bottleneck could be in the
124+ database resources. Make sure that the database has enough CPU, RAM and Network Throughput resources.
125+
126+
102127----------
103128
104129@htmlonly <div class =" bottom-nav " > @endhtmlonly
0 commit comments