Hi, I am using a workflow to update inventory in our shopify through API.
The workflows fetches shipment lines from postgres db and loops over them (Batches of 10 with delay of 100ms) . The loop code calls a function like so "const response = await adjust_item_inventory(shopify_store, access_token, location_id,inventory_item_id,available)" which does the post call to shopify. Most of the times the workflow completes successfully but recently we started receiving more and more exceptions on several calls ("Exception: FetchError: request to https://edikted.retool.com/api/workflow/runQueryForSandboxed failed, reason: socket hang up").
Thanks for reaching out.
PFA the workflow json (took out credentials from it)
The loop itself is using a js block to do the job . There is one python data prep block in the workflow but it can be moved to js relatively easy and doesn't seem to create any issues.
Thanks, upload_store_shipment - loop (1).json (129.0 KB)
@taluk,
This socket hang up error is a known bug that our engineering team is working on. We THINK it has to do with python code and the workaround thus far has been to change your code from python to js, but as you stated, you are already using js for the actual loop. It MAY still be related to your python code, however. Until we get this fixed, can you try converting all your python code to js and see if it fixes your problem?
+1. I am facing the same issue. i have python code block in my multi step loop in my workflow. Would be great if this gets fixed without me needing to convert my code to JS because i converted it to python in the first place due to some other unsolvable bug on my end.
@Muhammad_Tayyab,
So sorry to hear this. Engineering is still looking at this issue. It might be helpful if I passed them another workflow run Id, so if you wouldn't mind providing that, I'd appreciate it. thanks!
Glad to hear it, @Alex_Gao! That's the recommended fix for the time being, but we are tracking this issue and will hopefully have a more robust solution before too long. I'll provide an update here as soon as we have a concrete plan.