Attachments upload fails after abrupt power-off
December 19, 2025, 12:21:42 pm
There was an unscheduled poweroff of our forum-hosting VPS yesterday. On reboot, we can't upload attachments anymore:Your attachment couldn't be saved. This might happen because it took too long to upload or the file is bigger than the server will allow. Please consult your server administrator for more information. The administration center attachment settings don't show anything unusual. This isn't the first time we had problems with attachments, but it usually involved out-of-space situations were the Elkarte database couldn't be updated. We had to restore from backups every time for attachments and avatars to show up again, but I'd rather avoid it this time. IIRC, changing the attachments directory and moving the *.elk files from the shell into the new one would restore at least some of them, but then we'd end up with additional attachment directories in settings which couldn't be removed, unless with direct SQL commands which most usually corrupted something else in the database. This time I haven't touched anything, for forensics purposes. I can post any additional requested information to help debugging, including SQL commands. Thanks in advance.
Re: Attachments upload fails after abrupt power-off
Reply #1 – December 19, 2025, 04:43:46 pm
It seems odd that you have Auto Subdivide by years but everything is in a single attachment directory. Since everything is in a single directory, i'd try setting it to manual behavior and then set that files directory as the current one on the attachments directory page.