以前好像是没有这样的错误的,最近出现的。
大佬救救我,我不知道是什么原因造成的。
{"errorCode":1,"errorMessage":"user code exception caught","stackTrace":"Error: collection.aggregate:fail -501001 resource system error. [FailedOperation.Timeout] Execution request timeout, Please check optimize your request(such as index), but if the problem persists, contact us.\n at Object.toSDKError (/var/user/node_modules/wx-server-sdk/index.js:8089:19)\n at Object.checkError (/var/user/node_modules/wx-server-sdk/index.js:1422:23)\n at Promise (/var/user/node_modules/wx-server-sdk/index.js:1161:33)\n at process._tickCallback (internal/process/next_tick.js:68:7)","statusCode":430}
我也遇到同样的问题, 本地调试是成功的,但是云端部署就报 问题
返回结果
{"errorCode":1,"errorMessage":"user code exception caught","stackTrace":"TypeError: Converting circular structure to JSON\n --\u003e starting at object with constructor 'ClientRequest'\n | property 'socket' -\u003e object with constructor 'TLSSocket'\n --- property '_httpMessage' closes the circle\n at JSON.stringify (\u003canonymous\u003e)\n at callback (/var/runtime/node12/CallbackContext.js:31:23)\n at /var/runtime/node12/CallbackContext.js:81:16\n at /var/runtime/node12/Runtime.engine.js:237:13\n at processTicksAndRejections (internal/process/task_queues.js:97:5)","statusCode":430}
找出原因了,联表查询太慢的原因。
已经想其他办法解决,不联表查询了。
好像是这里太耗时了。还没想到优化办法
timeout==超时了,按此排查吧。