Possible problems with SQLite hosted in a volume
jovanvuleta
PROOP

7 months ago

I am running a bot written in typescript that stores blockchain data in sqlite in memory storage. The thing that I am seeing is that the persistence to the sqlite is not done properly for some event handling. On local I can't replicate the bugs I am seeing on railway replica instances where the events are actually handled and the model is updated but for some reason the actual save and persistence fails. This is noticed in the logs themselves and makes everything really hard to debug.

Could there be possibly issues with connections with the volume from time to time due to frequent access?

Here is the example log from railway that shows that the previous event updated user model is updated, when it actually isn't when the new event reads that same user model.

[Nest] 24 - 08/07/2025, 5:46:07 PM LOG [SyncTask] ACTION: repay | User: SP2V7K64E1N4ZKA6K575QVPC5R2RK9PY2WMG9HCKK | TX: 0xa21147bd5a58e2459e6f8eaecf28261fa84e0aac28ebca3e81771c69a7a88276 | Block: 2603189 | Event: 5

[Nest] 24 - 08/07/2025, 5:46:07 PM LOG [SyncTask] BEFORE: SP2V7K64E1N4ZKA6K575QVPC5R2RK9PY2WMG9HCKK | Debt: 7586142 | LP: 0 | Collateral: 17500

[Nest] 24 - 08/07/2025, 5:46:07 PM LOG [SyncTask] AFTER: SP2V7K64E1N4ZKA6K575QVPC5R2RK9PY2WMG9HCKK | Debt: 7824 | LP: 0 | Collateral: 17500

[Nest] 24 - 08/07/2025, 5:48:11 PM LOG [SyncTask] ACTION: remove-collateral | User: SP2V7K64E1N4ZKA6K575QVPC5R2RK9PY2WMG9HCKK | TX: 0x4118c6d749ab27351aca5de3818f653457b21b1be492d2746abeca01ff0b4133 | Block: 2603227 | Event: 2

[Nest] 24 - 08/07/2025, 5:48:11 PM LOG [SyncTask] BEFORE: SP2V7K64E1N4ZKA6K575QVPC5R2RK9PY2WMG9HCKK | Debt: 7586142 | LP: 0 | Collateral: 17500

[Nest] 24 - 08/07/2025, 5:48:11 PM LOG [SyncTask] AFTER: SP2V7K64E1N4ZKA6K575QVPC5R2RK9PY2WMG9HCKK | Debt: 7586142 | LP: 0 | Collateral: 100

I also want to highlight that regarding the code this is not a race condition or anything similar since we have process locks that prevent this and on local there are no issues.

Any help would be appreciated, thank you!

Solved

2 Replies

Railway
BOT

7 months ago


7 months ago

Apologies but this looks like an issue with the application level code. Due to volume, we can only answer platform level issues.

I've made this thread public so that the community might be able to help with you query.


Status changed to Awaiting User Response Railway 7 months ago


7 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open jake 7 months ago


Status changed to Solved jovanvuleta 7 months ago


Loading...