cameri / nostream

A Nostr Relay written in TypeScript
MIT License
713 stars 181 forks source link

I can't run the relay nostream-db is unhealthy [BUG] #345

Closed Karibura-Cyber closed 7 months ago

Karibura-Cyber commented 7 months ago

When I run ./script/start it failed

[+] Running 1/0 ✔ Container nostream-cache Running 0.0s Attaching to nostream, nostream-cache, nostream-db, nostream-migrate dependency failed to start: container nostream-db is unhealthy

cameri commented 7 months ago

Whats the output of docker logs nostream-db ?

Karibura-Cyber commented 7 months ago

Now I can fix it. I set postgresql config and restart again thanks.

asyscom commented 5 months ago

Now I can fix it. I set postgresql config and restart again thanks.

HI, could you explane as fixed? I cant Thank you

anasfik commented 5 months ago

Now I can fix it. I set postgresql config and restart again thanks.

HI, could you explane as fixed? I cant Thank you

I faced the same issue, it was caused because the resources I was using (1vCPU and 2 RAM) were low compared to what its expected, and so the default configuration set in the postgresql.conf file for the PostgreSQL, precisely the max_connections and shared_buffers value should be reduced, as example if shared_buffers was set to 2GB, try set it to 1GB, 512MB... until it doesn't exceed the available shared memory by PostgreSQL. This applies also to max_connections configuration.

Alternativly, if you were using a VM on the cloud, you can just resize it with higher resources.

if this don't apply to your issue, try running docker logs nostream-db and see the logs there, it should inform about the issue so you can then address it.