Jump to content

The dreaded error 200 during uploads


jair101

Recommended Posts

Posted

Some of my members complain that sometimes image uploads fail with error 200. What makes the issue extremely annoying is that:

- It is not confined to certain files, one time it can be one file, another time can be another. Trying the same file a few times helps from time to time, but not always
- It is not confined to a single users, some of them have the issue. Unfortunaltely I cannot replicate, for me everything works fine.
- It is not confined to browser/os
- It may depend on the size of the file, but it probably isn't
- It may depend on the time it takes to write a post, but it probably isn't

Here you can see screenshot from one of my users, you can see that most images have failed, but not all of them. All images come from the same camera and are not processed, basically very similar files fail in one case and succeed in another.

chrome_2017-05-16_11-37-37.png

There are various topics here discussing similar problems, for example this, this and this. I tried all the things mentioned there - I am already on Imagemagick and my upload limits and timeouts are generous enough. In fact I tried throttling my internet speed, it took me 40 minutes to upload a file, but it was no problem.  This error is not logged anywhere, so I cannot get more details about it. 

Server specs:

VPS, Centos 7.x (centminmod), x64
2xCPU cores, 4GB RAM
Nginx+Php-fpm (7.1)+MariaDB
 

Beer on me for whoever can help me solve it. 

  • 2 months later...
Posted

I'm getting this for a very specific type of image - anything taken with the iOS camera app. It's been happening for over a year now, and our suggestion to users was to take a screenshot and post that instead. I had thought older libraries were the cause, but our test server is now on the latest PHP and other libraries and it's still doing it. Upgrading to 4.2 had no effect.

If I had to guess, I'd say it was something about the location EXIF data from that camera app, but I don't have an iOS device so cannot test extensively.

  • 7 months later...
Posted

Check your Mod_security settings.

Mod_security could be blocking it from upload because the size is going over the mod_security limit. In the case of iphone photos, perhaps it is because iphones take large photos, and when you export an iphone photo the software reduces the file size?

I was having this issue with 200+mb .mp3 files and it was a Mod_security issue.

  • 2 weeks later...
Posted

I am experiencing the same problem when uploading an image from an iOS Photo Library. This only appears to happen with an unedited photo. As soon as the picture is edited like rotated or enhanced, it uploads fine after that.

Can someone test this to see if they can replicate this?

Posted

In my case just increasing the php limit was not sufficient. I also had to increase the nginx limit... client_max_body_size

Then restarted the services and the errors were gone.

So depending on your setup maybe that would do it.

Posted
3 minutes ago, -FP said:

I had to also increase the nginx limit nginx... client_max_body_size

can that be done in php.ini or htaccess files?

Posted
Just now, Frank Wulfers said:

can that be done in php.ini or htaccess files?

It would be the nginx config file I believe. Can't really assist much because I use Plesk and they have a menu where you can set all that.

Posted
40 minutes ago, Frank Wulfers said:

If it is a server limit, that doesn't explain why an unedited of 2.2 Mb errors out and that same edited image of 2.5 Mb processes fine?

It’s usually not file size, but image dimensions. That’s why I said it can even be a blank image. A processed image might even be larger in file size, but maybe has less pixels and it can then work. That’s why someone above gave the tip of creating screenshots and upload those. This will of course also reduce the image dimensions significantly. 

Posted

And just for the sake of completeness: make sure to actually upload web image formats. Apple’s new high efficiency formats for images and video are not supported by current web image libraries. 

Posted
1 hour ago, Frank Wulfers said:

If it is a server limit, that doesn't explain why an unedited of 2.2 Mb errors out and that same edited image of 2.5 Mb processes fine?

I can replicate this on a Windows PC. Download an unedited image taken with iOS to my PC and upload to a forum post causes the same 200 error. Edit the image in iOS, download to my PC and upload to the forum works just fine. Exact same 4032 x 3024 image dimensions and the edited image is slightly larger in Mb size than the unedited version.

I am just trying to figure out how these 2 files differ. Uploading the unedited file to this forum works fine.

  • 2 weeks later...
Posted

This bug appears to be caused by Apple’s HDR photos. No issue uploading regular (non-HDR) images from iOS. But the moment you upload an image marked as HDR, it will finish uploading and give the 200 error.

Temporary solution: If you edit the images marked HDR on iOS (Use your Photos app) and try uploading them, they work.

My suggestion: Have your iOS users turn off HDR in their Camera app. The reason some images upload whilst others don’t appears to be correlated to the HDR setting being set to Auto in the Camera app - not all photos are taken using the HDR feature. You can differentiate which are HDR and which aren't using your Photos app. It will mark them as HDR in the upper left corner or each photo. 

Posted

Great info Br4nd0nW, thanks for sharing. It appears this has been a bug in this software for a while so would be nice if the developers will fix this eventually.

 

Posted

Upon further tests, I don’t think it’s only HDR images. I was able to replicate the issue with both HDR and non-HDR on iPhone. I tried an iPad 5th gen and had no issues taking and uploading live and HDR images. It may be the High Efficiency formatting for images. That’s exclusive to iPhones as iPad doesn’t have that format functionality. 

I adjusted the memory limits on my VPS and am not having this issue anymore. Please make sure if you go the memory route, there are 3 limits that should be adjusted appropriately. 

Posted

For what is worth, for me (the original poster of the topic) the problem solved itself. Literally, I haven't changed a setting, I haven't done anything, just at one point the members stopped complaining. 

And as I mentioned, it had nothing to do with iDevices. 

  • 2 months later...
Posted

Same here. I ended up having to enable imagick and the imagick php extension. That reduced it significantly... actually I am not sure that I have gotten a -200 ever sense. 

By the way, this was what IPS support told me to do to resolve the issue.

Posted

Frequently (if an IOS device) it's because the user is using the (now default) HEIF/HEIC formats to take photos/images with.  Most current image processors (GD2, ImageMagick) barf on them.

Posted

Some images produce errors related to the embedded color profiles. This is resolved in our next maintenance release. Using ImageMagick if available is a suitable workaround.

Posted
45 minutes ago, bfarber said:

Some images produce errors related to the embedded color profiles. This is resolved in our next maintenance release. Using ImageMagick if available is a suitable workaround.

Well I am getting the error hardcore for video uploads. Staring 4.3 

guesing ImageMagick wont help for that. Any ideas? This error is destroying my business 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...