My PostgreSQL DB is acting up

erikmalm
HOBBY

a year ago

´
I get this error message: 2024-07-08 11:07:41.516 UTC [29] LOG: checkpoint complete: wrote 5 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.403 s, sync=0.004 s, total=0.413 s; sync files=5, longest=0.003 s, average=0.001 s; distance=19 kB, estimate=19 kB; lsn=0/1C47600, redo lsn=0/1C475C8

Can you help me troubleshoot what's going on with the DB? I can't generate a RSS Feed (it stopped working yesterday) and can't access the db contents from the web, however, I am able to connect to the DB via my local IDE and the application is still adding contents to it so there seems to be some local corruption but I can't figure out where the problem is. Please help.

0 Replies

erikmalm
HOBBY

a year ago

d9957bc2-4cac-4a55-807d-267c37d6d5ae


erikmalm
HOBBY

a year ago

The problem seems to be located in the Postgres DB. It MAY be related to me adding a column called "thumbnail" which happend around the same time it stopped working. However, it did work at least for a while after the addition of the thumbnail column.


erikmalm
HOBBY

a year ago

This is a likely issue as well:
2024-07-08 10:52:40.562 UTC [31] LOG: invalid record length at 0/1C40720: expected at least 24, got 0


a year ago

neither of these are errors, just because they are red does not mean they are automatically errors.

I can't generate a RSS Feed (it stopped working yesterday)
going to need more information about this, why are you unable to generate an rss feed? that sounds more like a code issue

can't access the db contents from the web
i assume you mean the data tab, and if so, its never been reliable so its best not to use it entirely

I am able to connect to the DB via my local IDE and the application is still adding contents to it
im not seeing anything that would indicate an issue with your database besides a code issue.


erikmalm
HOBBY

a year ago

Thank you for looking into this. I will not review the RSSFeedView


erikmalm
HOBBY

a year ago

This is where the RSSFeed is generated. Since you were able to explain that generating Data in the GUI should not be expected to work, also the fact that you can't find any issue with the current DB, I have dismissed an issue with the DB.


erikmalm
HOBBY

a year ago

Now I'm moving onto the code that generates the RSSFeed, which is a java file: RSSFeedVie (also, my headache, not yours 🙂 )


a year ago

sounds good, i wish you the best of luck debugging this!


erikmalm
HOBBY

a year ago

Thanks! I'll let you know if I need any more help. But it seems it's actually parsing of date that doesn't work (strangely enough, this isn't a problem for my json export)


a year ago

maybe the date the data tab inserted was wrong?


erikmalm
HOBBY

a year ago

Could be, hopefully I know exactly which one it is soon


a year ago

if you where using the data tab, your data could now be malformed in subtle ways


erikmalm
HOBBY

a year ago

Yes, I think that's probably the cause. I will add some logging information, but also some DB protection if possible


erikmalm
HOBBY

a year ago

I should be able to safeguard from malformed data insertion


a year ago

and most importantly stop using the data tab 😉


erikmalm
HOBBY

a year ago

Ahhhh


erikmalm
HOBBY

a year ago

Yes


erikmalm
HOBBY

a year ago

You're gith


erikmalm
HOBBY

a year ago

right


erikmalm
HOBBY

a year ago

That's probably what happend


erikmalm
HOBBY

a year ago

Hm, I will try to remove the article I change


a year ago

for database management, deploy the dbgate template into the project and have it connect to your database over the private network


erikmalm
HOBBY

a year ago

Good tips! This is just a POC so I can try that for the next setup (I will work out the kinks and try to build it again)


erikmalm
HOBBY

a year ago

Do you have a URL that explains how to set it up like you described? Also I had major issues deploying the front end, but ultimately used your github with caddy, not entirely sure why it worked but it did


a year ago

how to set dbgate up?


erikmalm
HOBBY

a year ago

Yes, I had a headache fixing the CORS so I jujst set it to allow all now between front end and back end


erikmalm
HOBBY

a year ago

But I need some better security / data mgm in the next step


erikmalm
HOBBY

a year ago

It's a bit besides of this support ticket, sorry.


erikmalm
HOBBY

a year ago

But also to say I was helped by your github repo for react + vite + caddy


a year ago

just look up some cors info for your backend framework and follow that, wouldnt be specfic to railway after all


erikmalm
HOBBY

a year ago

Thank you @Brody - I found the error to be a malformed date. Possibly a result of the GUI as you said. I have now changed to ensure that malformed dates are not included in the feed and will take steps to ensure that properly formatted dates and times are inserted to begin with.


a year ago

awsome!


erikmalm
HOBBY

a year ago

Really great help, thanks again!


a year ago

no problem!


My PostgreSQL DB is acting up - Railway Help Station