Hello! From time to time backendless started to return the error like below. When I redeploy the code (npm run deploy) the error disappears but I get timeouts and error 400. If I use debug mode (npm run debug) - it works well as expected. How can I fix it?
2019-10-22 00:01:44,623 | SERVER_CODE | ERROR | [28656] Error: Model Descriptor not found (/var/lib/backendless/repo/7d0ca196-6bfb-3b9f-ff01-ebb42a286700/files/servercode/JS/default/PRODUCTION/model.json)
at Function.load (/var/lib/backendless/nodejscoderunner/lib/server-code/model/descriptor.js:76:13)
at getServerCodeModel (/var/lib/backendless/nodejscoderunner/lib/server-code/runners/tasks/executor.js:160:92)
at Object.executor.execute (/var/lib/backendless/nodejscoderunner/lib/server-code/runners/tasks/executor.js:180:15)
at executeTask (/var/lib/backendless/nodejscoderunner/lib/server-code/runners/cloud-worker.js:45:44)
at processTask (/var/lib/backendless/nodejscoderunner/lib/server-code/runners/cloud-worker.js:71:9)
at process.on.message (/var/lib/backendless/nodejscoderunner/lib/server-code/runners/cloud-worker.js:80:5)
at process.emit (events.js:194:15)
at emit (internal/child_process.js:820:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
Hi Andrey,
A timeout may occur if the total execution time of your code exceeds the run time limit associated with the billing plan your app is on. (For details see the “Cloud Code execution time” line on the pricing page).
As for the “Model Descriptor not found” error, did you notice if the deployment of your code results in any errors?
Regards,
Mark
Hello! The issue “Model Descriptor not found” mainly appears not right after deployment.
Deployment goes well (log example is below). After redeploy (the same code) - we have no Model Descriptor not found, but then we have 400 from a mobile client. The log:
$ npm run deploy
liilix-servercode@1.0.1 deploy /Users/andreyolishchuk/Code/liilix
coderunner deploy
10:36:18.448 CodeRunner™ Backendless JavaScript CodeRunner v4.7.1
10:36:18.457 Copyright(C) 2019 Backendless Corp. All rights reserved.
10:36:18.463 IMPORTANT!
The business logic code will be deployed to model “default”.
Any business logic which is already deployed on the server in that model
will be removed and replaced with the code from your current project.
If this is an undesired behavior, stop now and set a different deployment model
either by using the --model argument or changing the model name in coderunner.json.
Would you like to continue? (Y/N)y
10:36:20.450 Building Model…
10:36:21.182 ServerCode Model built in 732ms
10:36:21.183 Services (1):
10:36:21.183 liilix (services/graphql.js)
10:36:21.242 Preparing app zip file for deployment…
10:36:24.829 3123 files added into deployment archive
10:36:25.717 Publishing Model to server
10:37:41.334 Successfully published
Hello Andrey
Could you please change you log level from WARN to INFO for SERVER_CODE logger and see why requests sometimes fail with 400, as I can see you’ve got a pretty big BL (a lots of files), so enabling INFO logger should give some more info about timeouts.
Regards, Vlad
Ok, thank you, it looks like really long execution time (I have found details in logs). Thank you for your help.