[GH-ISSUE #4527] [Bug]: "BadRequestError: request aborted" when importing largeish budget to blank server. #51051

Closed
opened 2026-04-30 16:55:16 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @theorician on GitHub (Mar 4, 2025).
Original GitHub issue: https://github.com/actualbudget/actual/issues/4527

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

Server app version 25.3.1
MacOS app version 25.3.1

I exported my budget from a server - it's about 50MB zipped, 350MB unzipped. I wiped the server entirely (it's a Docker server) and set the upload limits to something ridiculously high:

            actual:
              image: docker.io/actualbudget/actual-server:latest
              restart: unless-stopped
              environment:
                - ACTUAL_UPLOAD_FILE_SYNC_SIZE_LIMIT_MB=1000
                - ACTUAL_UPLOAD_SYNC_ENCRYPTED_FILE_SYNC_SIZE_LIMIT_MB=1000
                - ACTUAL_UPLOAD_FILE_SIZE_LIMIT_MB=1000
              volumes:
                - actual:/data

The server is entirely blank, I follow the setup, and then import my budget zip file. It does its thing for a while, the server logs show:

2025-03-04T01:24:06.826Z info: POST 200 /sync/upload-user-file
2025-03-04T01:24:07.037Z info: GET 200 /account/validate

and my budget loads in the client app, then starts syncing.

This goes for a while, then I get this error on the server:

BadRequestError: request aborted
    at IncomingMessage.onAborted (/app/node_modules/raw-body/index.js:245:10)
    at IncomingMessage.emit (node:events:517:28)
    at IncomingMessage._destroy (node:_http_incoming:224:10)
    at _destroy (node:internal/streams/destroy:109:10)
    at IncomingMessage.destroy (node:internal/streams/destroy:71:5)
    at abortIncoming (node:_http_server:781:9)
    at socketOnClose (node:_http_server:775:3)
    at Socket.emit (node:events:529:35)
    at TCP.<anonymous> (node:net:350:12)

and the client app has these:

Server Log: Syncing since 2025-03-04T00:26:23.248Z-3B22-b77f3a279a6e62a4 510950 (attempt: 0)

VM201:2 Server Log: au [Error]: PostError: Client Closed Request
    at lO (/Applications/Actual.app/Contents/Resources/app.asar/build/loot-core/lib-dist/electron/bundle.desktop.js:83:5481)
    at lN (/Applications/Actual.app/Contents/Resources/app.asar/build/loot-core/lib-dist/electron/bundle.desktop.js:83:7503)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async u6 (/Applications/Actual.app/Contents/Resources/app.asar/build/loot-core/lib-dist/electron/bundle.desktop.js:103:2864)
    at async /Applications/Actual.app/Contents/Resources/app.asar/build/loot-core/lib-dist/electron/bundle.desktop.js:103:1604 {
  meta: undefined,
  reason: 'Client Closed Request',
  type: 'PostError'
}
au [Error]: PostError: Client Closed Request
    at lO (/Applications/Actual.app/Contents/Resources/app.asar/build/loot-core/lib-dist/electron/bundle.desktop.js:83:5481)
    at lN (/Applications/Actual.app/Contents/Resources/app.asar/build/loot-core/lib-dist/electron/bundle.desktop.js:83:7503)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async u6 (/Applications/Actual.app/Contents/Resources/app.asar/build/loot-core/lib-dist/electron/bundle.desktop.js:103:2864)
    at async /Applications/Actual.app/Contents/Resources/app.asar/build/loot-core/lib-dist/electron/bundle.desktop.js:103:1604 {
  meta: undefined,
  reason: 'Client Closed Request',
  type: 'PostError'
}

index.1N4-CGNZ.js:79 unknown error {type: 'error', subtype: 'Client Closed Request'}

How can we reproduce the issue?

I'm not sure - it might be my budget file, or just a large budget file, or a regression in the server?

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Desktop App (Electron)

Operating System

Mac OSX

Originally created by @theorician on GitHub (Mar 4, 2025). Original GitHub issue: https://github.com/actualbudget/actual/issues/4527 ### Verified issue does not already exist? - [x] I have searched and found no existing issue ### What happened? Server app version 25.3.1 MacOS app version 25.3.1 I exported my budget from a server - it's about 50MB zipped, 350MB unzipped. I wiped the server entirely (it's a Docker server) and set the upload limits to something ridiculously high: ```yaml actual: image: docker.io/actualbudget/actual-server:latest restart: unless-stopped environment: - ACTUAL_UPLOAD_FILE_SYNC_SIZE_LIMIT_MB=1000 - ACTUAL_UPLOAD_SYNC_ENCRYPTED_FILE_SYNC_SIZE_LIMIT_MB=1000 - ACTUAL_UPLOAD_FILE_SIZE_LIMIT_MB=1000 volumes: - actual:/data ``` The server is entirely blank, I follow the setup, and then import my budget zip file. It does its thing for a while, the server logs show: ``` 2025-03-04T01:24:06.826Z info: POST 200 /sync/upload-user-file 2025-03-04T01:24:07.037Z info: GET 200 /account/validate ``` and my budget loads in the client app, then starts syncing. This goes for a while, then I get this error on the server: ``` BadRequestError: request aborted at IncomingMessage.onAborted (/app/node_modules/raw-body/index.js:245:10) at IncomingMessage.emit (node:events:517:28) at IncomingMessage._destroy (node:_http_incoming:224:10) at _destroy (node:internal/streams/destroy:109:10) at IncomingMessage.destroy (node:internal/streams/destroy:71:5) at abortIncoming (node:_http_server:781:9) at socketOnClose (node:_http_server:775:3) at Socket.emit (node:events:529:35) at TCP.<anonymous> (node:net:350:12) ``` and the client app has these: ``` Server Log: Syncing since 2025-03-04T00:26:23.248Z-3B22-b77f3a279a6e62a4 510950 (attempt: 0) VM201:2 Server Log: au [Error]: PostError: Client Closed Request at lO (/Applications/Actual.app/Contents/Resources/app.asar/build/loot-core/lib-dist/electron/bundle.desktop.js:83:5481) at lN (/Applications/Actual.app/Contents/Resources/app.asar/build/loot-core/lib-dist/electron/bundle.desktop.js:83:7503) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async u6 (/Applications/Actual.app/Contents/Resources/app.asar/build/loot-core/lib-dist/electron/bundle.desktop.js:103:2864) at async /Applications/Actual.app/Contents/Resources/app.asar/build/loot-core/lib-dist/electron/bundle.desktop.js:103:1604 { meta: undefined, reason: 'Client Closed Request', type: 'PostError' } au [Error]: PostError: Client Closed Request at lO (/Applications/Actual.app/Contents/Resources/app.asar/build/loot-core/lib-dist/electron/bundle.desktop.js:83:5481) at lN (/Applications/Actual.app/Contents/Resources/app.asar/build/loot-core/lib-dist/electron/bundle.desktop.js:83:7503) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async u6 (/Applications/Actual.app/Contents/Resources/app.asar/build/loot-core/lib-dist/electron/bundle.desktop.js:103:2864) at async /Applications/Actual.app/Contents/Resources/app.asar/build/loot-core/lib-dist/electron/bundle.desktop.js:103:1604 { meta: undefined, reason: 'Client Closed Request', type: 'PostError' } index.1N4-CGNZ.js:79 unknown error {type: 'error', subtype: 'Client Closed Request'} ``` ### How can we reproduce the issue? I'm not sure - it might be my budget file, or just a large budget file, or a regression in the server? ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Desktop App (Electron) ### Operating System Mac OSX
GiteaMirror added the bug label 2026-04-30 16:55:16 -05:00
Author
Owner

@theorician commented on GitHub (Mar 4, 2025):

I've restored an old version (ca 24h old) from backups and it works fine. I assume it's a problem in the budget file that's causing the issues here but given that it's a fresh import from the sqlite database, I'm not sure what that problem could be.

Any ideas on how to go about diagnosing this without uploading my entire financial history to someone else's server? ;) Thanks

<!-- gh-comment-id:2698738388 --> @theorician commented on GitHub (Mar 4, 2025): I've restored an old version (ca 24h old) from backups and it works fine. I assume it's a problem in the budget file that's causing the issues here but given that it's a fresh import from the sqlite database, I'm not sure what that problem could be. Any ideas on how to go about diagnosing this without uploading my entire financial history to someone else's server? ;) Thanks
Author
Owner

@theorician commented on GitHub (Mar 4, 2025):

Update: I've gone and installed an Actual server on my local machine, and uploaded the exported budget fresh to there. Upload and sync work just fine to it. So it's a network issue.

I have Actual running behind Traefik, and as far as I know traefik doesn't do any request timeouts etc by default but I'll check on that next. I'll report back.

Edit to add: I moved the data files from the local server instance to my remote server, and ditched (moved aside for safekeeping) the old budget there. It now syncs just fine and everything works.

I'm curious to see what happens when I make large changes via the API and if that'll cause sync to break again.

<!-- gh-comment-id:2698764166 --> @theorician commented on GitHub (Mar 4, 2025): Update: I've gone and installed an Actual server on my local machine, and uploaded the exported budget fresh to there. Upload and sync work just fine to it. So it's a network issue. I have Actual running behind Traefik, and as far as I know traefik doesn't do any request timeouts etc by default but I'll check on that next. I'll report back. Edit to add: I moved the data files from the local server instance to my remote server, and ditched (moved aside for safekeeping) the old budget there. It now syncs just fine and everything works. I'm curious to see what happens when I make large changes via the API and if that'll cause sync to break again.
Author
Owner

@MatissJanis commented on GitHub (Mar 28, 2025):

👋 Hiya!

It's definitely quite annoying to be hit by file-size limits when uploading budget files. But this very much depends on how Actual is being configured & hosted (i.e. nginx/traefik/pikapods/etc - every system has different ways to set max file size limits.. and things get even more hairy if proxies are used, etc.).

Since there isn't really anything we could do on our end (Actual) - I'll close this off. But feel free to reach out to the community on Discord if you need tech support with your particular configuration/server set-up. I'm sure the community will be able to assist there.

<!-- gh-comment-id:2761501719 --> @MatissJanis commented on GitHub (Mar 28, 2025): 👋 Hiya! It's definitely quite annoying to be hit by file-size limits when uploading budget files. But this very much depends on how Actual is being configured & hosted (i.e. nginx/traefik/pikapods/etc - every system has different ways to set max file size limits.. and things get even more hairy if proxies are used, etc.). Since there isn't really anything we could do on our end (Actual) - I'll close this off. But feel free to reach out to the community on Discord if you need tech support with your particular configuration/server set-up. I'm sure the community will be able to assist there.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#51051