I just set up my self-hosted from scratch similar to how it is in the cloud. Seemed better and my set up isn’t complex. Also didn’t need the data as I’m still developing.
It’s still stuck in pending and it’s been days. No way I know to mark it as failed.
Summary
The user is experiencing an issue with the Appwrite self-hosted to self-hosted migration getting stuck on pending. They have tried to troubleshoot by checking for errors, restarting the service, and rebooting, but the migration is still not progressing. The user also mentions that the memory usage seems fine and there are no error logs. Another user suggests that a large document may be causing the worker to crash due to exceeding the memory allocation. The user decides to restart the migration process and suggests not waiting too long if it gets stuck. There is no clear solution mentioned in the thread. It is recommended to reach out to the Appwrite team
punti_z
Rank 3: Container
Dec 20, 2023, 08:54
Huh, thats not ideal. Hopefully someone from appwrite team can provide some insights
Neo
Dec 20, 2023, 08:55
No it isn’t. Just how I solved it. My point in the end is, the process has stopped. Restart it, don’t wait as it’s been days for me. Almost a week.
punti_z
Rank 3: Container
Dec 20, 2023, 10:48
Ah ok. Understood. The status I guess will be stuck in pending then. That would really bother my OCD :)..
Neo
Dec 20, 2023, 10:48
lol same for me. I never visit that page again
D5
Dec 20, 2023, 16:52
You mean from cloud? Or self-hosted to self-hosted?
anything in the docker logs for the migration worker?
punti_z
Rank 3: Container
Dec 20, 2023, 17:07
Ah memory allocation error :/ server has 4 gigs. Oddly the server monitoring service shows memory never went over 60% utilization
Drake
Dec 20, 2023, 17:10
weeeirrrddd. do you have a really big document?
Drake
Dec 20, 2023, 17:11
do you have an error service configured?
punti_z
Rank 3: Container
Dec 20, 2023, 17:11
Nothing out of the ordinary, just regular records..
Drake
Dec 20, 2023, 17:12
PHP has a max memory of like 150MB or something...so something was loaded into memory that was 500MB, causing the worker to crash
punti_z
Rank 3: Container
Dec 20, 2023, 17:13
500 mb ?? That is weird, I dint think the entire database would be 500 mb
punti_z
Rank 3: Container
Dec 20, 2023, 17:14
Any way I can reboot or restart the service to have it complete and ensure everything is moved over ? As far as I have been able to check all the data has moved over ..
Drake
Dec 20, 2023, 17:15
well the whole DB shouldn't be loaded into memory anyways
Drake
Dec 20, 2023, 17:16
were there a lot of errors in the migration?
punti_z
Rank 3: Container
Dec 20, 2023, 17:17
No errors at all.. Looking at the console everything went smoothly, ~500k documents moved over. Then it just got stuck with no feedback that it had crashed ..
punti_z
Rank 3: Container
Dec 20, 2023, 17:19
Does the migration assistant migrate document in small batches at a time or collections ? I mean if a collection has 400k documents will be load them all to memory and try to commit transaction style ?
Drake
Dec 20, 2023, 17:22
batches
punti_z
Rank 3: Container
Dec 20, 2023, 17:30
Well I guess we need a if(batch size > 125 mb) in the migration worker 😋 .. But to close the loop on the migration since from what I can tell I have things moved over should I run it again or leave it at pending since I know its crashed so won't interfere will the functioning of appwrite
Drake
Dec 20, 2023, 17:30
you can just leave it
punti_z
Rank 3: Container
Dec 20, 2023, 17:32
Cool. Really appreciate all the time you spend helping the community. Its absolutely invaluable and I am greatful
punti_z
Rank 3: Container
Dec 20, 2023, 17:33
[SOLVED] Appwrite self-hosted to self-hosted migration stuck on pending
Drake
Dec 20, 2023, 17:33
well im not sure if that's the problem...beacuse you said every document was migrated...maybe the final report was too big?