My PostgreSQL DB is acting up

erikmalmHOBBY

10 months 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

erikmalmHOBBY

10 months ago

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


erikmalmHOBBY

10 months 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.


erikmalmHOBBY

10 months 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


10 months 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.


erikmalmHOBBY

10 months ago

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


erikmalmHOBBY

10 months 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.


erikmalmHOBBY

10 months ago

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


10 months ago

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


erikmalmHOBBY

10 months 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)


10 months ago

maybe the date the data tab inserted was wrong?


erikmalmHOBBY

10 months ago

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


10 months ago

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


erikmalmHOBBY

10 months ago

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


erikmalmHOBBY

10 months ago

I should be able to safeguard from malformed data insertion


10 months ago

and most importantly stop using the data tab 😉


erikmalmHOBBY

10 months ago

Ahhhh


erikmalmHOBBY

10 months ago

Yes


erikmalmHOBBY

10 months ago

You're gith


erikmalmHOBBY

10 months ago

right


erikmalmHOBBY

10 months ago

That's probably what happend


erikmalmHOBBY

10 months ago

Hm, I will try to remove the article I change


10 months ago

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


erikmalmHOBBY

10 months 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)


erikmalmHOBBY

10 months 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


10 months ago

how to set dbgate up?


erikmalmHOBBY

10 months ago

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


erikmalmHOBBY

10 months ago

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


erikmalmHOBBY

10 months ago

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


erikmalmHOBBY

10 months ago

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


10 months ago

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


erikmalmHOBBY

10 months 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.


10 months ago

awsome!


erikmalmHOBBY

10 months ago

Really great help, thanks again!


10 months ago

no problem!


My PostgreSQL DB is acting up - Railway Help Station