Api Endpoint POST /api/drive/files returns 500 #143
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I mostly can't open my Misskey Drive. Folders Endpoint is loading fine, but the Files endpoint returns 500 more often than not. Mostly happens on root directory in the drive so far and its probably related to it having a big chunk of files in it.
Logs in backend don't show anything. just mentiones that api request is taking a long time.
Checked the code a bit, and couldn't really find anything related to messages in the files api and db api area. I suspect the culprit might be hiding somewhere in the
pack
function inpackages/backend/src/models/repositories/user.ts
maybe related to unread messages.Its weird tho that it sometimes does work
I suspect if it only sometimes fails, and there are no errors in the log, and there are a lot of files in your drive, and the logs say it is taking a long time that it may be related to a database timeout.
I also think that the specific error of
reading 'message'
could more likely come from the database timeout resulting in something unexpected being thrown from the database drive and the normal error handler then tries to get themessage
property of that.Well, the thing is, i have to reopen my drive like 20 - 30 times until a request actually comes through without failing.
could very well be too, but in that case, it would at least log the timeout in the misskey logs (it usually does). haven't seen one there.
the thing with drive is, that it takes an awefull long time to load. not sure if it can be improved by setting some indices or something.
Puni, how big is your db?
If it's under 10gb, I'm wondering how feasible it might be for me to get a copy to experiment with.
It contains user data, but I think it might be possible to yeet all of that out?
Really we should have a process for stuff like this, ideally.
Around 30GB
I think this is be an issue with long running query. When i try to query all files in root directory (on psql directly) it takes an aweful long time to complete (like 1min or more). consequtive queries to perform faster tho and after running the query, drive loads up without issue.
not sure how to fix this tho. i mean, i could make a cron, that runs that query every now and then, but that isn't really a fix
With #203 merged, is this any better @puniko ? (it's not in preview2, so you'd have to merge it in or update to HEAD to get it)
I suspect it might be helpful here.
thanks for the hint. might merge it when i next update it or so. probably also takes some time to be sure of it working.
(i currently do the cron thingy i mentioned before, which is preventing this to happen)
ok, i have ran it for a bit without having the cron on. it is indeed an improvement, but only because it doesn't discard loaded folders when files fail. on the files, i still get a 500 after a while.
Does this problem still occur?
Closing this as stale.