superadmin icon indicating copy to clipboard operation
superadmin copied to clipboard

The database was suddenly deleted

Open Invincible83 opened this issue 1 year ago • 2 comments

A strange thing happened to me. I have a pretty powerful VPS with ~10 apps. Over the morning they all stopped working. Superadmin couldn't load (the apps). All other apps were throwing 502 Bad Gateway. I figured out what was the problem but not what caused it.

The databases/applications.json was empty. Fortunately applications.backup contained json but applications.json was completely empty. There was no {} either, so superadmin threw an error when loading the file on startup.

I am attaching a zip with the code that made the problem - exactly what happened. Unfortunately I couldn't figure out why applications.json was suddenly empty. Maybe a mini outage at the vps hosting but I can't simulate that. I didn't add any app. No app had errors. And even none of them were close to SSL expiration.

test.zip

====================================================
PID           : 1699
Node.js       : v20.10.0
Total.js      : v4093
OS            : linux 5.4.0-105-generic
Memory        : 9.72 MB / 17.54 MB
User          : root
====================================================
Name          : Total.js
Version       : 1.0.0
Date          : 2024-03-22 08:03:23
Mode          : debug
====================================================
Directory     : /www/superadmin
node_modules  : /www/node_modules/total4/
====================================================

Thank you

Invincible83 avatar Mar 22 '24 21:03 Invincible83

Yes, it's strange. Are you sure you have free space on your server? 

Can you try our latest version?

  • but first backup your current version of SuperAdmin
  • source code: https://github.com/totaljs/superadmin/tree/v10

We are using this v10 with no issue. 

BTW: I recommend to use Total.js Cloud Code Editor

petersirka avatar Mar 22 '24 22:03 petersirka

Storage Used: 29.5 GB Total: 95.9 GB

Memory Used 507.7 MB Total 15,2 GB

So yes, I have a free space on the server. I'll try superadmin v10. Sadly, there's no way how to replicate that. It worked without problems for several months.

Thank you

Invincible83 avatar Mar 22 '24 23:03 Invincible83