Skip to content
Back

CSV imports were not working but found a fix, now failed imports persist!

  • 0
  • 3
  • Self Hosted
20 Jul, 2026, 13:58

With 1.9.5 Self-Hosted on a remote Debian 13 VPS I was trying to upload some data using the Import from CSV function. After following the Docs I created a csv file with no $ variables as I am happy for Appwrite to generate these, all other data is provided as per the docs, I click Upload and all I see is a list of in progress imports. Picture attached. I have only found one reference to csv so far in appwrite log:

TypeScript
appwrite  | http.request · 17.5ms · cb8d1194
appwrite  |
appwrite  |   level              info
appwrite  |   http.method        POST
appwrite  |   http.path          /v1/migrations/csv/imports
appwrite  |   http.response.code 202

So I looked at docker compose logs appwrite-worker-migrations and see the following:

TypeScript
appwrite-worker-migrations  | [Error] Type: Exception
appwrite-worker-migrations  | [Error] Message: _APP_MIGRATION_HOST is not set
appwrite-worker-migrations  | [Error] File: /usr/src/code/src/Appwrite/Platform/Workers/Migrations.php
appwrite-worker-migrations  | [Error] Line: 500

Looking in the Docs, this variable is not mentioned. In the .env from the Docs we have _APP_MIGRATION_HOST=appwrite but its not in the appwrite-worker-migrations environment list in the docker-compose.yml.

I added _APP_MIGRATION_HOST=appwrite to the appwrite-worker-migrations environment section and tried again and it worked without any delays.

How do I now get rid of the pending CSV imports? I can only assume these have failed and are not being closed properly byt the Console!! Clicking the X closes the popup, however on refreshing page the list re-appears. FYI after refreshing the page the completed import has disappeared, the rest remain!!

TL;DR
CSV imports were failing due to a missing variable in the .env file. The user found a fix by adding `_APP_MIGRATION_HOST` to the `appwrite-worker-migrations` in docker.compose.yml but the failed imports still persisted. It was suggested that the variable should be removed from the database directly using SQL or mongocli, but waiting for confirmation before proceeding.
20 Jul, 2026, 16:06

<@1458145783156310273> do you have _APP_MIGRATION_HOST=appwrite in ur .env?

20 Jul, 2026, 17:54

he said it : "I added _APP_MIGRATION_HOST=appwrite to the appwrite-worker-migrations environment section and tried again and it worked without any delays."

tho his question, is more how to remove the leftover CSV imports that are stuck from before the .env addition.

20 Jul, 2026, 19:32

Yes, it was present in the default .env in the Docs and without knowing what it was for I left it alone.

20 Jul, 2026, 19:38

Just a little edit as I just noticed a mistake I made, I should have said that I added _APP_MIGRATION_HOST to the appwrite-worker-migrations environment section in the docker.compose.yml.

20 Jul, 2026, 19:39

As this is was a new install after previous upgrade failure I got the files from the Docs and the current version of the docker-compose.yml does not have the _APP_MIGRATION_HOST variable in the appwrite-worker-migrations but it is present in the Github repo!

20 Jul, 2026, 19:41

I just looked again and the list of failed imports is still showing in the console!

20 Jul, 2026, 19:41

oh good catch, ye that's a possible bug, as they kinda copy the compose from github to the website when self-hosted is released, but is not synced with updates

20 Jul, 2026, 19:42

that's possible that it should be removed from the db directly (using sql or mongocli)

20 Jul, 2026, 19:42

tho i will let Chirag confirm when he's back

20 Jul, 2026, 19:43

Thanks I will wait for some guidance, dont want to break something and have to start the whole process again 👍

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more