I use my project app on Meteor for Install 3 PC and 1 Load balance with MongoDB, 1 pc for Primary writing and 2 pc for reading data, of which there are about 300 users, I noticed that my app always crashes when the CPU installed my app is more than 40% 1 or 2 hour without knowing why.Please advise and give advice solutions.
What version are you using?
Can you also share what packages your project has?
@grubba I use meteor 2.7.1 and this is my package i use
“@aacassandra/vue3-progressbar”: “^1.0.3”,
“@babel/runtime”: “^7.17.8”,
“@element-plus/icons-vue”: “^1.1.3”,
“@fullcalendar/core”: “^5.11.3”,
“@fullcalendar/daygrid”: “^5.11.3”,
“@fullcalendar/interaction”: “^5.11.3”,
“@fullcalendar/timegrid”: “^5.11.3”,
“@fullcalendar/vue3”: “^5.11.2”,
“@google-cloud/storage”: “7.7.0”,
“@googlemaps/markerclusterer”: “^2.5.3”,
“@zxcvbn-ts/core”: “^3.0.4”,
“@zxcvbn-ts/language-common”: “^3.0.4”,
“@zxcvbn-ts/language-en”: “^3.0.2”,
“animate.css”: “^3.7.2”,
“axios”: “^0.19.2”,
“bcrypt”: “^3.0.8”,
“body-parser”: “^1.19.0”,
“casual”: “^1.6.2”,
“chart.js”: “^3.7.1”,
“click-outside-vue3”: “^4.0.1”,
“collect.js”: “^4.16.4”,
“compressorjs”: “^1.0.6”,
“convert-excel-to-json”: “^1.6.1”,
“crypto-js”: “^4.1.1”,
“decimal.js”: “^10.2.0”,
“dom-to-image-more”: “^2.12.0”,
“element-plus”: “2.3.14”,
“encoding”: “^0.1.13”,
“file-saver”: “^2.0.5”,
“github-markdown-css”: “^3.0.1”,
“gitlab”: “^10.2.1”,
“html-to-docx”: “^1.8.0”,
“inputmask”: “^5.0.7”,
“jquery”: “^3.6.0”,
“jsbarcode”: “^3.11.5”,
“json2csv”: “^4.5.4”,
“jsonwebtoken”: “^9.0.2”,
“libphonenumber-js”: “^1.10.53”,
“lodash”: “^4.17.21”,
“markdown-it-attrs”: “^4.1.6”,
“marked”: “14.1.3”,
“mathjs”: “^6.6.5”,
“md-editor-v3”: “^4.8.3”,
“meteor-node-stubs”: “^1.0.0”,
“moment”: “^2.29.1”,
“moment-timezone”: “^0.5.33”,
“mongoose”: “^6.3.0”,
“mongoose-lean-virtuals”: “^0.5.0”,
“numeral”: “^2.0.6”,
“perfy”: “^1.1.5”,
“printd”: “^1.5.0”,
“read-excel-file”: “^5.5.3”,
“shelljs”: “^0.8.4”,
“simpl-schema”: “^3.4.1”,
“socket.io”: “4.7.4”,
“socket.io-client”: “4.7.4”,
“to-css”: “^1.2.1”,
“to-words”: “^4.0.0”,
“v-money”: “^0.8.1”,
“vue”: “3.2.37”,
“vue-element-loading”: “^3.0.1”,
“vue-i18n”: “^9.2.0-beta.32”,
“vue-json-excel”: “^0.2.99”,
“vue-json-pretty”: “^2.0.6”,
“vue-meta”: “^3.0.0-alpha.2”,
“vue-progressbar”: “^0.7.5”,
“vue-router”: “^4.0.12”,
“vue-types”: “^1.7.0”,
“vue3-clipboard”: “^1.0.0”,
“vue3-count-to”: “^1.1.1”,
“vue3-google-map”: “0.21.0”,
“vue3-markdown-it”: “^1.0.9”,
“vue3-touch-events”: “^4.1.0”,
“vuedraggable”: “^4.1.0”,
“vuex”: “^4.0.2”,
“vuex-persistedstate”: “^4.1.0”,
“xlsx”: “https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz”,
“xlsx-populate”: “^1.21.0”
I had a similar issue before, in my case it’s not because of packages. It was my bad code.
It’s not a problem if the server is fast enough. It’s something like a race condition, if task B finished before task A then it’s OK but if task A finishes before task B, then memory leaks happen.
I have edited and shortened the code and it runs faster but it still crashes, about once every 2 weeks.