Handling chunked media uploads and webhook sync timeouts in Frappe v15 custom app

Hi everyone, I have been building a custom Frappe v15 application to manage video template metadata and heavy asset syncing for our mobile editing portal caputapk, but I have run into a persistent issue when handling incoming asset packages from our external media service. When our remote workers trigger large multipart file transfers through custom whitelisted endpoints, the request frequently stalls and throws a 504 gateway timeout right around the sixty-second mark, even after adjusting max_execution_time in site_config.json and increasing client_max_body_size in Nginx. Alongside this timeout, we noticed related background worker processes randomly failing with broken pipe errors during the file attachment phase, which leaves orphaned records in the File DocType and causes intermittent database locks during peak sync hours. We tried delegating the download step to frappe.enqueue, but the webhook payload validation drops if the verification hash expires before the queue picks up the job. Has anyone encountered similar timeout bottlenecks when syncing heavy external media payloads into Frappe, and is there an established pattern to handle chunked background file streaming without choking the Redis worker queue?