R
Railway12mo ago
adeg

MongoDB suddenly increased 10 GB and decreased 20GB

MongoDB suddenly increased 10 GB and decreased 20GB
36 Replies
Percy
Percy12mo ago
Project ID: b51e42c0-8a37-4633-8e1d-8f14fc187052
adeg
adegOP12mo ago
b51e42c0-8a37-4633-8e1d-8f14fc187052
adeg
adegOP12mo ago
No description
adeg
adegOP12mo ago
can anyone please help?
ElGato
ElGato12mo ago
Can you check if any update/delete operation was performed in the logs?
adeg
adegOP12mo ago
there is none a lof of valueable data were lost data was deleted down to 2GB for no reason after the screenshot
ElGato
ElGato12mo ago
Im not sure what it could be, but did you make a backup of your database? In Postgres you have pg_dump, mongoDB probably also has something like it
adeg
adegOP12mo ago
we didn't make any backup we have to refund all users' assets and close down the business for couple of days... we use a different mongodb now, not railway's anymore our service is trying to get back to the orignial data by scanning the blockchain... but it will take couple of days
ElGato
ElGato12mo ago
Ah alright, yeah railway is not that reliable it seems for database stuff
adeg
adegOP12mo ago
it will only recover part of our data
ElGato
ElGato12mo ago
Lets hope you get your data back
adeg
adegOP12mo ago
didn't know it would downsize itself for no reason data is gone can we get some railway support here to see what is wrong with my mongodb?
ElGato
ElGato12mo ago
Yeah its weird, havent seen something like this either Not sure if i can ping someone on this server, im just a customer as well Brody is pretty good with solving bugs though, but hes offline now
Adam
Adam12mo ago
Railway’s databases aren’t fantastic, but they won’t just randomly delete data or drop tables. If that’s happened, I encourage you to verify in the logs. This is very likely a case of user error where you or one of your teammates accidentally deleted a table. Or your database is exposed to the public web without proper authentication
adeg
adegOP12mo ago
they won’t just randomly delete data or drop tables.
I wish that is true. I cannot see any logs related to this issue. can someone please help. We are devastated right now
Adam
Adam12mo ago
please send your project/service id and I will flag in the team
Duchess
Duchess12mo ago
Thread has been flagged to Railway team by @Adam.
angelo
angelo12mo ago
Hey there @adeg - we haven't accessed your DB nor do we see any signs of data corruption. This is likely a code issue on your part.
adeg
adegOP12mo ago
I have another service with the same code and connect to a different database, that database is fine, nothing has happened to it. If there is something is wrong with my service code, both databases should be impacted. can you pull out the logs? ?
angelo
angelo12mo ago
The logs you have there are the same logs we have. I am seeing a bunch of failed to auth and disconnect logs, so it must have meant that you didn't close your connections properly.
adeg
adegOP12mo ago
how do I know what caused the deletion?
angelo
angelo12mo ago
I don't know, it's Mongo... usually you set up replica sets for this reason.
adeg
adegOP12mo ago
also there is a sudden data increase for 10GB within couple of minutes
angelo
angelo12mo ago
Again, we didn't do that. This is an error with your code.
adeg
adegOP12mo ago
how would that happen? I want to prevent that from happening in the future? how would I do that?
angelo
angelo12mo ago
If you are running an indexer, you should have local state of the chain queried via redis and then you persist the state of the chain onto S3 backed up or on your Mongo. Anyway, locking thread. If you are a company who is operating a mission critical service, you may want to consider Business Class.
adeg
adegOP12mo ago
I'm on Pro plan...
angelo
angelo12mo ago
Yep- realized that. Sorry, misqueried. Point stands. I am terribly sorry about your business, but there is nothing we else can do here.
adeg
adegOP12mo ago
is there anyway to have the mongodb query logs?
adeg
adegOP12mo ago
it didn't record what is going on with the data incease and decrease I want to have more logs for that matter just in case that happened again I can debug now I don't have anything to debug with
Adam
Adam12mo ago
the logs you see are the only logs that exist
adeg
adegOP12mo ago
how do I get more logs if I continue use your service? or there is no way to get more logs in the future? How can I download the volume? https://railway.app/template/guiCBv I can only click the file one by one can someone please help? ? anyone please?
JustJake
JustJake12mo ago
You can alter the image to add debug logs
Want results from more Discord servers?
Add your server