Skip to content

SaaS: 504 on version finalize (POST /v2/projects/<id>/versions) for pushes over ~550-758 MB — regression since 2026-07-09 #650

Description

@NewGraphEnvironment

Summary

On app.merginmaps.com (SaaS), version finalize (POST /v2/projects/<id>/versions) returns nginx 504 for pushes above ~550–758 MB since 2026-07-09 (~21:00 UTC). Identical payloads finalized fine on 2026-07-08. All chunks upload successfully (~2 min, 105–106 chunks); the finalize POST times out at ~60 s and no version is created (verified via project_versions).

Workspace: newgraph. Project id: 1db8700b-4f68-439f-bf85-9189694fe5d1 (newgraph/sern_peace_fwcp_2023).

Failure/success matrix (UTC)

When Project Payload Result
07-09 01:14 sern_peace_fwcp_2023 1,060 MB gpkg (35-table diff) ✅ v194
07-09 21:04 → 07-10 16:21 sern_peace_fwcp_2023 1,060 & 758 MB ❌ 504 ×22 (all hours incl. overnight)
07-09 21:39 test project 390 MB gpkg (41-table diff) ✅ <1 min
07-10 16:29 test project 550 MiB single file ✅ ~90 s
07-10 16:38 sern_peace_fwcp_2023 514 MB gpkg (51-table diff) ✅ v196, 114 s

Controls:

  • The same 1,060 MB payload finalized fine 2026-07-09 01:14 UTC (v194) — the regression window starts after that.
  • ≤550 MB versions finalize in seconds throughout, including to the affected project (v196).
  • Local files pass PRAGMA quick_check; upload bandwidth measured 118 Mbps; failures occur strictly after all chunks are uploaded.
  • Reproducible with pure random data (see reprex) — the gpkg contents are exonerated.

Raw error (.mergin/client-log.txt)

2026-07-09 14:03:05,194 Finishing transaction for project newgraph/sern_peace_fwcp_2023
2026-07-09 14:04:01,897 Push failed with HTTP code 504. Upload details: 106 file chunks, total size 1109753856 bytes.
2026-07-09 14:04:01,926 --- push finish failed! Detail: <html>...504 Gateway Time-out...nginx...
HTTP Error: 504
URL: https://app.merginmaps.com/v2/projects/1db8700b-4f68-439f-bf85-9189694fe5d1/versions
Method: POST

Reprex (no project data needed)

cd <any mergin project>
dd if=/dev/urandom of=probe.bin bs=1M count=800   # above the ceiling
mergin push                                        # chunks upload OK, finalize 504s
# at count=550 it lands; ceiling was between 550 and 758 MB on 2026-07-10

Client environment

Component Version
mergin-client (python) 0.12.3 (pygeodiff lib 2.2.0)
Python 3.12.13
OS macOS 26.2

Questions

  1. Is this a known issue or recent change to the gateway timeout / version-assembly path for large versions on SaaS?
  2. Do the 22 failed transactions leave anything pending server-side that needs cleanup?
  3. What's the recommended path for ~1 GB versions (async finalize, timeout bump)? We can test client 0.13.3 / geodiff 2.3.0 if relevant, but the 504 is post-upload and by the evidence above independent of client version.

Possibly related: #157 (worker timeout on large point-cloud push finalize, self-hosted), #21 (closed, large raster upload timeout).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions