Nehaj Posted January 16, 2020 Posted January 16, 2020 Hello, Since I allowed upload of images on my forum, more and more users with slow connections are getting this non-descriptive error. Thing that makes me mad from your side, dear Invision Community, is that you didn't bother to at least add a description to that error. My findings are that is a thing purely from your side, since my server settings as well as image settings are optimized to the core. Can someone shed some light on this issue? aia and SJ77 2
aia Posted January 17, 2020 Posted January 17, 2020 I have the same issue with some animated GIFs when using ImageMagick, and it does not related to connection speeds or file sizes in my case. Temporarily switched to GD, because did not have a time to investigate this problem yet. +1 for more diagnostic info in this error. Nehaj 1
Dean Spencer Posted January 17, 2020 Posted January 17, 2020 I myself have gotten this error and my users as well when uploading images to IP.Gallery happens at random though.
Rhett Posted January 17, 2020 Posted January 17, 2020 Make sure you are setting a max image size to save, this helps greatly reduce these errors, as mobile and other devices these days take extremely large images, it's more difficult for web servers to handle such large items. Setting a max image size to save should resolve the issue for you. This is for forum and other attachments, not gallery though.
aia Posted January 17, 2020 Posted January 17, 2020 (edited) 29 minutes ago, Rhett said: Make sure you are setting a max image size to save, this helps greatly reduce these errors, as mobile and other devices these days take extremely large images, it's more difficult for web servers to handle such large items. Setting a max image size to save should resolve the issue for you. This is for forum and other attachments, not gallery though. What about my case, when i get this problem with not large animated GIFs and only with IPS+ImageMagick, while having enough memory and very powerful server? Any other PHP apps which using ImageMagick (WP, for example) are working just fine on this server with the same GIF files, i have this problem only with IPS. Tested with this GIF: outline.zip Any tips about how to diagnose this problem more specifically? Edited January 17, 2020 by Mr 13 Nehaj 1
Rhett Posted January 17, 2020 Posted January 17, 2020 You provided the issue in your reply "Large animated gif's" Other software likely uses a different upload method to be honest, and which may be something we can improve on. That single image you attached is actually 93 images 😂 which is why you are likely seeing issues as it's pretty large to handle, and GD seems to do a more efficient job in this case on that file type.
aia Posted January 17, 2020 Posted January 17, 2020 (edited) I know what it has 93 frames, obviously. The problem is not related to the size of the GIF or to it's count of frames, it just appears with some of them, not matter how large or small they are. (To be honest it's not large at all, it's even less than 1 MB) My question is about the diagnostics and fixing this problem. WIll IPS provide informative error instead of just "-200"? Edited January 17, 2020 by Mr 13
Rhett Posted January 17, 2020 Posted January 17, 2020 Just now, Mr 13 said: I know what it has 93 frames, obviously. The problem is not related to the size of GIF, it just appears with some of them, not matter how large or small it is. (To be honest it's not large at all, it's even less than 1 MB) My question is about the diagnostics and fixing this problem. I wasn't talking about the file size in mb, I was referring to the file itself, it's very large and difficult for any image processing utility to handle 93 images, some do it more efficiently than others, in this case GD handles this better. I was just explaining why you are seeing issues with such images. Just looking at disk space size doesn't provide all the info though.
aia Posted January 17, 2020 Posted January 17, 2020 (edited) 59 minutes ago, Rhett said: I was just explaining why you are seeing issues with such images Well, it's your assumption. No more no less. But what about the diagnostics instead of assumptions? WIll IPS provide informative error instead of just "-200"? 93 frames and 816kb is nothing for GIFs. Most of uploaded GIFs on my forums has a lot more frames and sizes (and a lot of them was uploaded when i used ImageMagic). As i already said, problem is not related to the count of frames of to the size of the GIF, it just appears with some of GIFs, not matter how large or small they are, or how much frames does they have. I've uploaded bigger GIFs with much more frames and it worked just fine. Played around with timeouts and memory limits, e.t.c. and it does not affected the error with GIFs which has lower size and less frames. Does not matter, the actual problem is lack of information in the error, that's it. Edited January 17, 2020 by Mr 13 BomAle, THE_SUPERMAN and CoffeeCake 2 1
Nehaj Posted January 17, 2020 Author Posted January 17, 2020 (edited) 5 hours ago, Rhett said: Make sure you are setting a max image size to save, this helps greatly reduce these errors, as mobile and other devices these days take extremely large images, it's more difficult for web servers to handle such large items. Setting a max image size to save should resolve the issue for you. This is for forum and other attachments, not gallery though. Of course I did. Setting is 1200x1200 pixels. My server has 20 GB of RAM and I gave as a a test 10 GB for this, and no avail. I still get the error. There is something wrong with your software. Even timeout on my server is set to 10 minutes. This happens to a lot of users who use WIFI and upload images from their phones. Last user who had problem is continuously getting this error for his 1.9 MB images and his 0.5 Mbit/s upload speed. I repeat, something is wrong from your side. Fix it as soon as possible, please. You did not gave me an answer or solution to this issue. Quote It is all set and it doesn’t work. Edited January 17, 2020 by Nehaj
bfarber Posted January 17, 2020 Posted January 17, 2020 The -200 error shows up generally when a PHP error we are unable to capture (such as "out of memory" or "max execution time exceeded") has occurred. PHP ends up exiting and printing out the core PHP error, and the uploader (which is a general open source uploader - we didn't write it) shows the "-200" error as a result. @Mr 13 this can happen with large animated gifs when using ImageMagick but not GD simply because ImageMagick supports manipulating animated gifs (i.e. to create a thumbnail) and GD does not. Thus, what is probably happening is that ImageMagick is causing an "out of memory" error (manipulating large images is extremely memory intensive), while GD just skips trying to create a thumbnail altogether because it cannot retain animation. We are happy to investigate if you submit a ticket, but 99% of the time the only real solution is to increase the resources available (remove memory limits, max execution times, etc. - sometimes there are limits in upstream software like Apache or nginx that need to be adjusted as well). SJ77 1
Rikki Posted January 17, 2020 Posted January 17, 2020 I just wanted to note that we've improved the error message for this error in 4.5, so users at least won't see a mysterious "-200" message when it happens. Cinu, SJ77, Nehaj and 4 others 1 6
Nehaj Posted January 18, 2020 Author Posted January 18, 2020 9 hours ago, bfarber said: The -200 error shows up generally when a PHP error we are unable to capture (such as "out of memory" or "max execution time exceeded") has occurred. PHP ends up exiting and printing out the core PHP error, and the uploader (which is a general open source uploader - we didn't write it) shows the "-200" error as a result. @Mr 13 this can happen with large animated gifs when using ImageMagick but not GD simply because ImageMagick supports manipulating animated gifs (i.e. to create a thumbnail) and GD does not. Thus, what is probably happening is that ImageMagick is causing an "out of memory" error (manipulating large images is extremely memory intensive), while GD just skips trying to create a thumbnail altogether because it cannot retain animation. We are happy to investigate if you submit a ticket, but 99% of the time the only real solution is to increase the resources available (remove memory limits, max execution times, etc. - sometimes there are limits in upstream software like Apache or nginx that need to be adjusted as well). @bfarber, my PHP settings are maxed out of all proportions. I really don't know what more I can do. Can you tell me what values you recommend? User with UL speed of 0.5 Mbit/s with one 1.9 MB image gets this error. He needs max 30 sec for this, and my max execution time is set to 120 sec. 7 hours ago, Rikki said: I just wanted to note that we've improved the error message for this error in 4.5, so users at least won't see a mysterious "-200" message when it happens. What would it be written? Question is - how to avoid this error?
Makoto Posted January 20, 2020 Posted January 20, 2020 On 1/17/2020 at 9:10 PM, Nehaj said: @bfarber, my PHP settings are maxed out of all proportions. I really don't know what more I can do. Can you tell me what values you recommend? User with UL speed of 0.5 Mbit/s with one 1.9 MB image gets this error. He needs max 30 sec for this, and my max execution time is set to 120 sec. Unfortunately the only way to be sure of the specific cause of the error you are getting is for a developer to reproduce it on your server environment and see what errors are being logged at the server level. If you haven't already, submit a support ticket so support can take a look at it, but it's likely going to come down to a server environment specific issue that needs to be addressed.
bfarber Posted January 20, 2020 Posted January 20, 2020 max_input_time can be a limiting factor if the user's upload speed is very slow, or (again) it could be a limit set in your server software. I can't give you a blanket answer I'm afraid - there are plenty of causes. If your user is at all technically inclined they may be able to open the developer tools in their browser when performing an upload to capture the actual response from the server. This will probably help identify what is causing an error. Makoto 1
SamGG Posted May 21, 2020 Posted May 21, 2020 On 1/17/2020 at 2:38 AM, Mr 13 said: What about my case, when i get this problem with not large animated GIFs and only with IPS+ImageMagick, while having enough memory and very powerful server? Any other PHP apps which using ImageMagick (WP, for example) are working just fine on this server with the same GIF files, i have this problem only with IPS. Tested with this GIF: outline.zip Any tips about how to diagnose this problem more specifically? Same issue here... I'm on the cloud version...
Recommended Posts