acdh-oeaw / arche-core

MIT License
0 stars 1 forks source link

Very long upload can cause transaction rollback #29

Closed zozlak closed 1 year ago

zozlak commented 1 year ago

A 32GB upload in the carnuntum collection (/ARCHE/staging/CarnuntumArchiv2022_20663/data/03_GIS/2018-04-09_LBI-ArchPro_RESTRICTED.zip) causes transaction rollback. Most probably the transaction isn't properly locked and the timeout expires before the file is fully uploaded to the server.

/ARCHE/vendor/bin/arche-import-binary \
  --noCertCheck \
  ARCHE/staging/CarnuntumArchiv2022_20663/data/03_GIS \
  https://id.acdh.oeaw.ac.at/carnuntumarchiv/03_GIS \
  https://arche.acdh.oeaw.ac.at/api \
  {user} {pswd} \
  --skip not_exist binary_exist
zozlak commented 1 year ago

Transaction manager works fine, the problem was the upload_tmp_dir PHP setting pointing to the location running out of the disk space. It turns out that the PHP creates a copy of the request body there even if we read the php://input as a stream.

Solved by adjusting the Apache config in the arche-docker-config repo