GGT_DATABASE_OPERATION_TIMEOUT: One operation in the backend database took too long to execute
Hi all,
I'm seeing a lot of errors like this on my app. What could be the cause?
Example trace id: 8966ac30681066556164bd007c3f98ea
8 Replies
Some help here? 😅
Unknown User•7mo ago
Message Not Public
Sign In & Join Server To View
Hello,
Are you possibly running a lot of code in the transactions (run functions) of nested records? Lets say you have a logic in the productVariant create/update run function and there are lots of productVariants. That can cause a timeout to occur. I haven't had a chance to look more into this yet as I'm jut jumping on this. Thought I'd give you somethig to think about while I dig a little
Hi @Chocci_Milk, just coming back to this
The errors seems to be coming from the product/update webhook handlers. I'm not running any heavy code inside the run action, the only code running on product update is a side effect that runs on the onSuccess method of the product/update action:
On the updateMediaStatus action I'm actually making an api call inside the run method, but is that enough to cause a timeout?
Side note: What does updateMediaStatus do? Does it simply update a field on the current record? If so, why aren't you using
record.mediaStatus = something
in the run function
Btw, are you still seeing these timeouts?
Also, why are you fetching the same product while in the run function? Why aren't you using record.mediaStatus
?
I don't think thats enough to cause db timeouts though@Chocci_Milk Yes, still seeing them. The reason for the fetch is because mediaStatus is a computed field, so I don't have direct access to it through the record object
Hi guys, any insight about this? I'm still seeing those errors
Hello,
I've been swamped with work and haven't yet had any time to look into this. Rest assured that I didn't forget about you
I just did a quick check on the trace and will be asking some questions to the infra team. At first glance it looks like an issue on our end but I need more information to determine for sure
Ok, we've made some changes to your tables. Can you keep an eye for more timeouts? It should be faster now
Will do. Thank you!