What is the difference between pm2 restart and pm2 reload

The difference is documented here: As opposed to restart, which kills and restarts the process, reload achieves a 0-second-downtime reload. The latter means (found here): With reload, pm2 restarts all processes one by one, always keeping at least one process running. It also states that: If the reload system hasn’t managed to reload your application, … Read more

How to add dates to pm2 error logs?

As per the pm2 logs official documentation, you can use –time, which prefixes logs with a standard formatted timestamp. pm2 start app.js –time If you have already created the app, you can update it while restarting the application with: pm2 restart 0 –time Make sure to pm2 save afterwards. Note that you can also use … Read more

Cluster and Fork mode difference in PM2

The main difference between fork_mode and cluster_mode is that it orders pm2 to use either the child_process.fork api or the cluster api. What does this means internally? Fork mode Take the fork mode as a basic process spawning. This allows to change the exec_interpreter, so that you can run a php or a python server … Read more

mongoError: Topology was destroyed

It seems to mean your node server’s connection to your MongoDB instance was interrupted while it was trying to write to it. Take a look at the Mongo source code that generates that error Mongos.prototype.insert = function(ns, ops, options, callback) { if(typeof options == ‘function’) callback = options, options = {}; if(this.s.state == DESTROYED) return … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)