{"id":21819,"date":"2024-01-02T15:50:27","date_gmt":"2024-01-02T15:50:27","guid":{"rendered":"https:\/\/server.hk\/blog\/21819\/"},"modified":"2024-11-14T10:26:33","modified_gmt":"2024-11-14T02:26:33","slug":"how-to-fix-mongodb-error-code-236-fortestingerrorextrainfo","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/21819\/","title":{"rendered":"\u5982\u4f55\u4fee\u5fa9 MongoDB \u932f\u8aa4\u78bc &#8211; 236 &#8211; ForTestingErrorExtraInfo"},"content":{"rendered":"<h1 id=\"how-to-fix-mongodb-error-code-236-fortestingerrorextrainfo-ckrJcGtFlg\">\u5982\u4f55\u4fee\u5fa9 MongoDB \u932f\u8aa4\u78bc &#8211; 236 &#8211; ForTestingErrorExtraInfo<\/h1>\n<p>MongoDB \u662f\u4e00\u500b\u6d41\u884c\u7684\u958b\u6e90 NoSQL \u6578\u64da\u5eab\uff0c\u63d0\u4f9b\u9ad8\u6027\u80fd\u3001\u53ef\u64f4\u5145\u6027\u548c\u9748\u6d3b\u6027\u3002\u7136\u800c\uff0c\u5982\u540c\u4efb\u4f55\u8edf\u9ad4\u4e00\u6a23\uff0c\u5b83\u53ef\u80fd\u9047\u5230\u9700\u8981\u89e3\u6c7a\u7684\u932f\u8aa4\u3002\u5176\u4e2d\u4e00\u500b\u932f\u8aa4\u662f MongoDB \u932f\u8aa4\u78bc &#8211; 236 &#8211; ForTestingErrorExtraInfo\u3002\u5728\u9019\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u5011\u5c07\u63a2\u8a0e\u9019\u500b\u932f\u8aa4\u7684\u610f\u7fa9\u4ee5\u53ca\u5982\u4f55\u4fee\u5fa9\u5b83\u3002<\/p>\n<h2 id=\"understanding-mongodb-error-code-236-fortestingerrorextrainfo-ckrJcGtFlg\">\u7406\u89e3 MongoDB \u932f\u8aa4\u78bc &#8211; 236 &#8211; ForTestingErrorExtraInfo<\/h2>\n<p>MongoDB \u932f\u8aa4\u78bc &#8211; 236 &#8211; ForTestingErrorExtraInfo \u662f\u5728\u67e5\u8a62\u8a08\u5283\u51fa\u73fe\u554f\u984c\u5c0e\u81f4\u67e5\u8a62\u5931\u6557\u6642\u767c\u751f\u7684\u932f\u8aa4\u3002\u67e5\u8a62\u8a08\u5283\u662f MongoDB \u7528\u4f86\u6709\u6548\u57f7\u884c\u67e5\u8a62\u7684\u7b56\u7565\u3002\u7576\u9019\u500b\u932f\u8aa4\u767c\u751f\u6642\uff0c\u610f\u5473\u8457\u67e5\u8a62\u8a08\u5283\u672a\u80fd\u6b63\u78ba\u57f7\u884c\uff0c\u5c0e\u81f4\u767c\u751f\u932f\u8aa4\u3002<\/p>\n<p>\u6b64\u932f\u8aa4\u53ef\u80fd\u7531\u65bc\u591a\u7a2e\u539f\u56e0\u5f15\u8d77\uff0c\u4f8b\u5982\uff1a<\/p>\n<ul>\n<li>\u4e0d\u6b63\u78ba\u7684\u7d22\u5f15\u4f7f\u7528<\/li>\n<li>\u8a18\u61b6\u9ad4\u4e0d\u8db3<\/li>\n<li>\u786c\u4ef6\u554f\u984c<\/li>\n<li>\u7db2\u7d61\u554f\u984c<\/li>\n<\/ul>\n<h2 id=\"fixing-mongodb-error-code-236-fortestingerrorextrainfo-ckrJcGtFlg\">\u4fee\u5fa9 MongoDB \u932f\u8aa4\u78bc &#8211; 236 &#8211; ForTestingErrorExtraInfo<\/h2>\n<p>\u8981\u4fee\u5fa9 MongoDB \u932f\u8aa4\u78bc &#8211; 236 &#8211; ForTestingErrorExtraInfo\uff0c\u4f60\u53ef\u4ee5\u8ddf\u96a8\u4ee5\u4e0b\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"1-analyze-the-query-ckrJcGtFlg\">1. \u5206\u6790\u67e5\u8a62<\/h3>\n<p>\u9996\u5148\u5206\u6790\u89f8\u767c\u932f\u8aa4\u7684\u67e5\u8a62\u3002\u6aa2\u67e5\u4efb\u4f55\u53ef\u80fd\u7684\u554f\u984c\uff0c\u5982\u7f3a\u5931\u6216\u4e0d\u6b63\u78ba\u7684\u7d22\u5f15\u3001\u6548\u7387\u4e0d\u9ad8\u7684\u67e5\u8a62\u6216\u5927\u578b\u7d50\u679c\u96c6\u3002\u4f7f\u7528 MongoDB \u7684 explain() \u65b9\u6cd5\u4f86\u7372\u5f97\u67e5\u8a62\u57f7\u884c\u8a08\u5283\u7684\u6d1e\u5bdf\uff0c\u4e26\u8b58\u5225\u4efb\u4f55\u554f\u984c\u3002<\/p>\n<h3 id=\"2-optimize-the-query-ckrJcGtFlg\">2. \u512a\u5316\u67e5\u8a62<\/h3>\n<p>\u4e00\u65e6\u4f60\u8b58\u5225\u4e86\u67e5\u8a62\u7684\u554f\u984c\uff0c\u512a\u5316\u5b83\u4ee5\u6539\u5584\u5176\u6027\u80fd\u3002\u8003\u616e\u6dfb\u52a0\u9069\u7576\u7684\u7d22\u5f15\uff0c\u91cd\u5beb\u67e5\u8a62\u4ee5\u4f7f\u5176\u66f4\u9ad8\u6548\uff0c\u6216\u9650\u5236\u7d50\u679c\u96c6\u5927\u5c0f\u3002\u4f7f\u7528 MongoDB \u67e5\u8a62\u512a\u5316\u5668\u4f86\u5e6b\u52a9\u4f60\u505a\u51fa\u6709\u95dc\u67e5\u8a62\u512a\u5316\u7684\u660e\u667a\u6c7a\u7b56\u3002<\/p>\n<h3 id=\"3-check-hardware-and-network-ckrJcGtFlg\">3. \u6aa2\u67e5\u786c\u4ef6\u548c\u7db2\u7d61<\/h3>\n<p>\u78ba\u4fdd\u4f60\u7684\u786c\u4ef6\u548c\u7db2\u7d61\u57fa\u790e\u8a2d\u65bd\u6b63\u5e38\u904b\u4f5c\u3002MongoDB \u4f9d\u8cf4\u9019\u4e9b\u7d44\u4ef6\u4ee5\u9054\u5230\u6700\u4f73\u6027\u80fd\u3002\u6aa2\u67e5\u4efb\u4f55\u786c\u4ef6\u6545\u969c\u3001\u7db2\u7d61\u64c1\u585e\u6216\u5ef6\u9072\u554f\u984c\uff0c\u9019\u4e9b\u53ef\u80fd\u6703\u5f71\u97ff\u67e5\u8a62\u57f7\u884c\u3002\u4fee\u5fa9\u4efb\u4f55\u78ba\u5b9a\u7684\u554f\u984c\uff0c\u4ee5\u6d88\u9664\u5b83\u5011\u4f5c\u70ba\u932f\u8aa4\u7684\u6f5b\u5728\u539f\u56e0\u3002<\/p>\n<h3 id=\"4-increase-memory-allocation-ckrJcGtFlg\">4. \u589e\u52a0\u8a18\u61b6\u9ad4\u5206\u914d<\/h3>\n<p>\u5982\u679c\u4f60\u9047\u5230\u8207\u8a18\u61b6\u9ad4\u76f8\u95dc\u7684\u554f\u984c\uff0c\u8003\u616e\u589e\u52a0 MongoDB \u7684\u8a18\u61b6\u9ad4\u5206\u914d\u3002\u8a18\u61b6\u9ad4\u4e0d\u8db3\u53ef\u80fd\u5c0e\u81f4\u67e5\u8a62\u5931\u6557\u548c\u6027\u80fd\u4e0b\u964d\u3002\u5206\u914d\u66f4\u591a\u8a18\u61b6\u9ad4\u7d66 MongoDB \u4ee5\u78ba\u4fdd\u5b83\u6709\u8db3\u5920\u8cc7\u6e90\u6709\u6548\u57f7\u884c\u67e5\u8a62\u3002<\/p>\n<h3 id=\"5-upgrade-mongodb-ckrJcGtFlg\">5. \u5347\u7d1a MongoDB<\/h3>\n<p>\u5982\u679c\u4f60\u6b63\u5728\u4f7f\u7528\u8f03\u820a\u7248\u672c\u7684 MongoDB\uff0c\u8003\u616e\u5347\u7d1a\u81f3\u6700\u65b0\u7a69\u5b9a\u7248\u3002MongoDB \u5b9a\u671f\u767c\u5e03\u66f4\u65b0\uff0c\u5305\u62ec\u932f\u8aa4\u4fee\u6b63\u3001\u6027\u80fd\u6539\u9032\u548c\u65b0\u7279\u6027\u3002\u5347\u7d1a\u5230\u6700\u65b0\u7248\u672c\u53ef\u4ee5\u5e6b\u52a9\u89e3\u6c7a\u5df2\u77e5\u554f\u984c\uff0c\u5305\u62ec\u932f\u8aa4\u78bc &#8211; 236 &#8211; ForTestingErrorExtraInfo\u3002<\/p>\n<h3 id=\"6-seek-professional-support-ckrJcGtFlg\">6. \u5c0b\u6c42\u5c08\u696d\u652f\u63f4<\/h3>\n<p>\u5982\u679c\u4f60\u6309\u7167\u4e0a\u8ff0\u6b65\u9a5f\u64cd\u4f5c\u5f8c\u4ecd\u7121\u6cd5\u4fee\u5fa9\u932f\u8aa4\uff0c\u53ef\u80fd\u9700\u8981\u5c0b\u6c42\u5c08\u696d\u652f\u63f4\u3002MongoDB \u64c1\u6709\u6d3b\u8e8d\u793e\u7fa4\u4e14\u63d0\u4f9b\u5546\u696d\u652f\u63f4\u9078\u64c7\u3002\u53ef\u806f\u7e6b MongoDB \u793e\u7fa4\u6216\u8003\u616e\u8207 MongoDB \u5c08\u5bb6\u5408\u4f5c\uff0c\u4ed6\u5011\u53ef\u4ee5\u5e6b\u52a9\u8a3a\u65b7\u548c\u89e3\u6c7a\u554f\u984c\u3002<\/p>\n<h2 id=\"summary-ckrJcGtFlg\">\u7e3d\u7d50<\/h2>\n<p>\u7e3d\u4e4b\uff0cMongoDB \u932f\u8aa4\u78bc &#8211; 236 &#8211; ForTestingErrorExtraInfo \u662f\u5728\u67e5\u8a62\u8a08\u5283\u51fa\u73fe\u554f\u984c\u5c0e\u81f4\u67e5\u8a62\u5931\u6557\u6642\u767c\u751f\u7684\u932f\u8aa4\u3002\u8981\u4fee\u5fa9\u6b64\u932f\u8aa4\uff0c\u5206\u6790\u548c\u512a\u5316\u67e5\u8a62\uff0c\u6aa2\u67e5\u786c\u4ef6\u548c\u7db2\u7d61\u57fa\u790e\u8a2d\u65bd\uff0c\u589e\u52a0\u8a18\u61b6\u9ad4\u5206\u914d\uff0c\u8003\u616e\u5347\u7d1a MongoDB\uff0c\u4e26\u5728\u9700\u8981\u6642\u5c0b\u6c42\u5c08\u696d\u652f\u63f4\u3002<\/p>\n<p>\u5982\u679c\u4f60\u6b63\u5728\u9047\u5230 MongoDB \u932f\u8aa4\u78bc &#8211; 236 &#8211; ForTestingErrorExtraInfo \u6216\u4efb\u4f55\u5176\u4ed6 MongoDB \u76f8\u95dc\u554f\u984c\uff0cServer.HK \u53ef\u4ee5\u63d0\u4f9b\u53ef\u9760\u4e14\u9ad8\u6027\u80fd\u7684 VPS \u4e3b\u6a5f\u65b9\u6848\u3002\u6211\u5011\u7684 VPS \u65b9\u6848\u54c1\u8cea\u5353\u8d8a\uff0c\u8a2d\u8a08\u6eff\u8db3 MongoDB \u4ee5\u53ca\u5176\u4ed6\u6578\u64da\u5eab\u61c9\u7528\u7684\u56b4\u82db\u8981\u6c42\u3002\u8a2a\u554f <a href=\"https:\/\/server.hk\">server.hk<\/a> \u4e86\u89e3\u66f4\u591a\u6709\u95dc\u6211\u5011\u7684\u9999\u6e2f VPS \u4e3b\u6a5f\u670d\u52d9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u4fee\u5fa9 MongoDB \u932f\u8aa4\u78bc&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-21819","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21819","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=21819"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21819\/revisions"}],"predecessor-version":[{"id":23539,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21819\/revisions\/23539"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=21819"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=21819"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=21819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}