I was adding media files (scans) for several sources and I have a weird problem uploading one of them. While in the upload window I selected the file and then decided I wanted to change the name. Rather than retyping the whole name, I decided to edit file name in the folder. I refreshed the file list in the uploader, reselected the file I wanted and tried to upload. At first it just seemed like it would start uploading for a few seconds and then do nothing (staying on the file upload screen).
I can still upload other files. I can create new media objects and upload other files to them. I've tried renaming the original file and I still can't get it to upload. The current state is that I get a "connection was reset" page. Apache logs show a 500 error on the POST, and webtrees shows either 1, 2, or 3 of the errors pasted below (separated by 3-4 seconds for multiples). Any suggestions? I feel like something got corrupted in a table or something. The raw GEDCOM of the media objects I've tried seem to look normal.
Ok, first I edited to make that a less ugly stack trace.
Next, I went to a different computer and used Chrome (was previously Firefox): didn't work. I created a new test tree and tried to upload: didn't work. I rotated the image and tried uploading again: worked. Rotate it back: didn't work.
No, the file is <10 MB and the limit is 32 MB. I've uploaded several files that were larger. It really, curiously, seems to be tied to that very specific file, which makes me think there is some meta data about the file being passed in the POST first and the server recognizes this and causes some sort of error.
I tried seeing if there was anything notable in the POST request headers. I found that it was uploading ~3.7 of 9.7 MB. The main difference between working and non working uploads seems to be the size. I tried creating dummy files that were exactly the same size, but the upload size kept varying by a few hundred bytes for reasons I didn't understand and I couldn't reproduce the problem with anything other than the image.
I finally gave up and decided just to crop a few rows of white pixels left in the original scan and use that. I still have the original file that I can't upload if anyone has more ideas for troubleshooting, but I think I'll just mark it as NFC and WTF and move on.