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 initially not working, but a fix was found by ensuring the connection to MySQL with correct credentials from the environment variables.
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 👍

27 Jul, 2026, 08:44

<@743532656767270934> The failed imports are still showing in the Console, any guidance on how to remove these?

27 Jul, 2026, 11:58

u will need manual work from what i can tell, i dont think we support cleanup atm

10 Aug, 2026, 13:50

<@743532656767270934> I don't want to go into the instance/DB and start removing stuff, could I get some direction as to where the imports are stored?

12 Aug, 2026, 06:37

you should be able to connect to mysql given the password and username in ur env

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