Skip to content
{"code":503,"message":"database is not ready!"} appears in browser and can't access n8n deployment
bharatkaravadra
OP

2 years ago

This started happening after a Google Download node stopped completing and preventing the whole flow completing. I then started seeing access and space errors in n8n. I then tried reloading the whole n8n instance in the browser and the above error now appears and I can't access n8n.

It feels as if storage may be used up and if so I have no idea how to clear it and prevent the build up in future (the Google downloads are simple used to create embeddings in Supabase, so the files are not required after the flow is complete)>

Help would be sincelery appreciated as I can't use my workflows in n8n at the moment. Thank you in advance.

Solved

67 Replies

bharatkaravadra
OP

2 years ago

c624836d-84ca-49b8-a0ed-13931b8393c6


2 years ago

Have you checked your volume capacity wherever you are storing these files?


2 years ago

You can find your volumes attached to your services on your project page.


bharatkaravadra
OP

2 years ago

@Adam I had no idea I was storing these files. I'm very new to this and not sure where to look or what to configure even though you seem to have pointed me to the attached screen. As you can see Postgres is crashing on redeploy so somethng is not right. Your advice would appreciated.

1361832245580664902


2 years ago

Please open the service and click the latest deployment. Send the deployment logs here by clicking CMD/CTRL+K and downloading them, then sending the file here.


bharatkaravadra
OP

2 years ago

Logs attached. I found this screen with disk usage and it's been going up so I expect something has got full. The n8n instance seems to use Postgres so I'm not sure if the build up is in Postgres or elsewhere, or how to delete/prune it. Your advice again would be appreciated,

1361842403648213103

1361842402939371550


2 years ago

These don't look like the metrics specifically for the postgres service, can you please send those? You can find them in the same service menu as the deployment logs were pulled from.


2 years ago

It seems like the postgres service is full. You can SSH into the service using the Railway CLI to clear out some temporary files if that is the issue


2 years ago

But I'd like to first see the postgres metrics so we can identify exactly what is getting full



2 years ago

they just need to grow it


2 years ago

its 500mb as of writing this


2 years ago

Yep that's what I assumed


2 years ago

Ah my bad, I missed that this graph stopped at 500mb. Numbers too small

1361847823808729188


bharatkaravadra
OP

2 years ago

I pressed CRL+K on this screen which seems to be the Postgres service. Here they are again.

1361847901772447755

1361847901109616741


2 years ago

Like Brody said, all you'll need to do is grow your volume, follow the docs here to do so

https://docs.railway.com/guides/volumes


bharatkaravadra
OP

2 years ago

I'm happy to grow it once the project is in production, but how do I prune/delete what's there at the moment, and get back in?


2 years ago

Is there a reason you don't want to grow it now?


bharatkaravadra
OP

2 years ago

Yes, the project is in development and I want to test what grows the data and by how much. So pruning/deleting to 'zero' would give a foundation to test from.


2 years ago

Wiping the volume now may have unintended consequences, but you're welcome to do so. You can wipe it by clicking on the volume underneath your postgres service, clicking settings from the new menu, and navigating down to Wipe Volume


bharatkaravadra
OP

2 years ago

I don't want to do a general wipe. I think it's just the Google Drive binary downloads that are being stored and accumlating the most in n8n, but I don't know how to specifically delete those.


2 years ago

At this point, it would be better for you to grow the volume so you can properly access the database and delete those files manually.


2 years ago

Growing the volume just increases the disk space available. Currently you're stuck at 500mb as you created the volume when you were on the trial plan. Now that you're on the hobby plan, you have access to up to 5gb


bharatkaravadra
OP

2 years ago

OK - I may try that but a quick question... If I delete the project, will all the related data be deleted so I can start afresh with 0Mb?

The reason I ask is that I have all the required workflows backed up and can just create a fresh project with a new install of n8n and just import the projects and re-enter some credentials. Then I can re-consider creating a regular process for pruning/deleting n8n stored data.


2 years ago

Yes. Deleting the project will delete the contents of all volumes, as well as any configuration you have set


bharatkaravadra
OP

2 years ago

Thanks. I grew the volume to 1Gb and I got access.

As I use n8n with the Google Drive download node the usage is increasing so I added n8n pruning variables in it's service and set it to 12 hours (See screen capture), but the usage isn't going down. Any suggestions on this?

I was going to try to manually delete data in Postgres using the database UI, but it's asking for Required Variables (see screen capture). Where do I get the values for these to enter?

1362075068632662078

1362075068867412240


2 years ago

The database UI is notoriously glitchy. You'll be better off using a proper database client like DBGate


2 years ago

As for n8n specific support, I can't provide that. You'll have to look online for answers there


bharatkaravadra
OP

2 years ago

Thanks Adam. I'll ask about n8n in their community forum.

Re: DBGate, where do I get the host, username, password, port of the Postgres service in Railway, and any other details for the config requirements in DBGate or any other Postgres access app?


2 years ago

Those can all be found in the service variables. In DBGate there should be an option to use a URL to connect, you can use your database's public URL to connect


bharatkaravadra
OP

2 years ago

That's what I thought before I asked, but there isn't a PUBLIC URL variable and the top 2 don't have a URL as such in their values (see attached).

1362105612913086655


2 years ago

DATABASE_URL is the public url


bharatkaravadra
OP

2 years ago

The DATABASE_URL is this:

postgres://railway:PASSWORD@:/railway

and the DATABASE_PRIVATE_URL is this:

postgres://railway:[email protected]:5432/railway

The only string that looks like a URL is postgres.railway.internal

I tried that with username railway (because that's what it is in the variables), the correct pasword and port 5432, without and without database name railway (again that's what the variable is), and in DBGate it displays this alert:

Connect failed: getaddrinfo ENOTFOUND postgres.railway.internal


2 years ago

postgres.railway.internal is the INTERNAL url, it will fail outside your service private network


bharatkaravadra
OP

2 years ago

That's what I thought and there is no public URL in the variables.


2 years ago

DATABASE_URL is the public one


bharatkaravadra
OP

2 years ago

That has this (as above):

postgres://railway:PASSWORD@:/railway

Where is the public URL in that?


2 years ago

You are omitting some extra info in that URL, there should be a host at the end of it

postgresql://postgres:[email protected]:58350/railway


2 years ago

In this case it is roundhouse.proxy.rlwy.net


2 years ago

But that changes


bharatkaravadra
OP

2 years ago

That's not there - I just copied the variable next to the variable name.


2 years ago

Is that DB empty? If so, delete it and deploy a new one.


bharatkaravadra
OP

2 years ago

The whole string is this:

postgres://railway:PASSWORD@:/railway

apart from PASSWORD being the actual password


2 years ago

the database that deploys with n8n does not come with a tcp proxy, they need to add one, and redeploy the database


bharatkaravadra
OP

2 years ago

The volume size is going up. see attached. So can't be empty.

1362111047041024201


bharatkaravadra
OP

2 years ago

Thanks - but how do I do that? I'm new to this so please give me the steps.


2 years ago

you are in good hands with the community members


2 years ago

im just here to provide some context to them is all


2 years ago

Didn't know that


2 years ago

learn something new every day


2 years ago

Go to the service settings -> Scroll until you see "Public Networking", there should be a button with the label "+ TCP Proxy"


2 years ago

The port should be your DB Port (default is 5432)


2 years ago

and after that you should redeploy your database


bharatkaravadra
OP

2 years ago

OK - I did that and it added an entry like this:

abcde.proxy.rlwy.net:12345 -> :5432

where abcde and 12345 are something else and the -> is a single arrow.

So, is abcde.proxy.rlwy.net now the public url?

And what is 12345


2 years ago

12345 is the proxied port


2 years ago

Did u redeploy the service? what does your DATABASE_URL looks like now?


bharatkaravadra
OP

2 years ago

Just redployed and the DATABASE_URL has changed now and has a URL. Do I use 5432 or the new 12345 for the port when connecting to the DB?


2 years ago

12345


2 years ago

Can't you just copy the entire DATABASE_URL and paste it on DBGate?


2 years ago

instead of separating each value


2 years ago

there should be a "Use Database URL" button or switch


bharatkaravadra
OP

2 years ago

That connected. Thank you.


2 years ago

amazing!


bharatkaravadra
OP

2 years ago

Now have to have some food and then work out why the n8n data isn't being pruned/deleted.


2 years ago

I'm gonna mark this thread as solved! Open a new one if you find any other issue


2 years ago

!s


Status changed to Solved medim • over 1 year ago


2 years ago

Thanks for the backup Medim!


Welcome!

Sign in to your Railway account to join the conversation.

Loading...