Data not reflected even after update in database

I updated the database
Cleared cache as per the instructions from the developers. Did everything required.
The pods run on k3s. Should I restart them?
I was thinking it's the WAF cache, but the data is not being reflected inside the server itself when I curl it.

What could've happened? Any ways to troubleshoot? Why is it not being reflected? For web servers, we are using nginx.

It would help if you said which DBMS you are using, and showed what you ran to make the update happen. Is this as SQL transactions, or some fast loader or other API?

Who are the "developers" -- that sounds like something you found online, not a mainstream product.

Did you make a clean closedown of the session, including commit if necessary ?

2 Likes

Hmm, it's mysql. I used manual update query.
Developers mean software developers/engineers who wrote the software.
Yes commit was done. Honestly, this is scary curious turning me.

WAF as web application firewall ?
What is the real application which needs to see that data ?

Caching could be the reason, as many software keep local cache of needed-partial database data required to work faster - as cache entry is invalidated when query is made against it and data is older then desired e.g initial/first query of such data will be slower (a cache miss).

What is behind nginx ? Is this k8s ingress controller ?

Can you be sure that you updated all required fields in row ?
Perhaps there more fields required to be updated to 'make' your app aware of such change - do you have developers docs suggesting how such changes are made ?

In any case, making direct database updates using sql clients should be quite rare, mostly during major updates of app - change of DB relation model and such.

You may have inadvertently broken your app by making such backend updates :slight_smile:

But this is just a guessing game....

Regards
Peasant.

You may have inadvertently broken your app by making such backend updates :slight_smile:

Don't scare me. I hate making changes from backend but that's what an admin does right? :frowning:

I have consulted to those folks who have created this system and they've no clue now. Because I've done everything as per their instruction. We've a system cache clearing policy in mysql.

Don't focus on database.
You did an update, it is there - if made on DB which app is actually using :slight_smile:

DB will (should) never return cached data if data on disk has changed (see ACID)

I mean it could in some occasions such with many updates and selects against same table or hitting some standby db server not completely synced with primary - doubtful that case...

Other (application programmed) logic may exist as well e.g. are you sure app is querying that specific table you updated ?

Read what cache actually is how it should be treated.
Droping DB cache will actually make things work slower until it is warm again.

Check application layer, what and how is querying that database and returning such stale data.

Application/code using DB and developers who made it have no clue what is happening when update is made :confused:

If this is expected from you - then you need to delve deeper into that stack by examining code and logs, get familiar with stuff beyond update statement.

Please answer questions posted about entire stack, software used (of version, of operating system), command executed etc.

The more information you provide better help you get, using keywords like 'nginx', 'k3s', 'waf' without any context means little to none.

Regards
Peasant.

1 Like

restarting the respective pod fixed the issue. UFF. IDK man, restarting fixes everything for me.

Temporarily only. It happens that this time, you verified the update manually, and noticed the problem. There might be hundreds of cases where nobody noticed, past and future.

1 Like

If I was the developer, I'd have built a great software...I can't code software only scripts :frowning: