You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix BC-10008678752: tame self-hosted import disk demands
A self-hosted import paid ~4x the export size in peak disk: multipart
buffer + attach copy + a blob.open tempfile copy per read pass + the
imported attachment blobs. ENOSPC mid-import crashes the shared
puma/Solid Queue container, and SQLite reports it as 'database or disk
is full' — misdirecting operators at the database.
- ZipFile.read_from_disk now opens the stored file in place via
service.path_for (zip reading only needs random access), eliminating
a full-size tempfile copy in each of check and process
- Account::Import#check preflights free disk (df -Pk on the service
root) and fails fast with a clear insufficient_disk reason instead of
crashing the container mid-import
Card: https://app.basecamp.com/2914079/buckets/27/card_tables/cards/10008678752
Claude-Session: https://claude.ai/code/session_01CSpm1M4ZQwmurqqNb5uQx8
Copy file name to clipboardExpand all lines: app/views/mailers/import_mailer/failed.html.erb
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@
4
4
<p>It looks like the account you are trying to import already exists.</p>
5
5
<%elsif@import.failed_due_to_invalid_export?%>
6
6
<p>The ZIP file isn't a Fizzy account export.</p>
7
+
<%elsif@import.failed_due_to_insufficient_disk?%>
8
+
<p>Your server doesn't have enough free disk space for this import. Free up at least twice the export file's size and try again.</p>
7
9
<%else%>
8
10
<p>This may be due to corrupted export data or a conflict with existing data. Please try again with a fresh export, or reach out for help if the problem persists.</p>
Your server doesn't have enough free disk space for this import. Free up at least twice the export file's size and try again.
7
9
<% else -%>
8
10
This may be due to corrupted export data or a conflict with existing data. Please try again with a fresh export, or reach out for help if the problem persists.
0 commit comments