Side note… the following error message was in the logs multiple times, probably for each image upload attempt:
[09-Aug-2018 19:10:59 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home1/<directory info removed>/wp-includes/class-wp-image-editor-imagick.php on line 362
Also another odd thing noticed… a 10Mb file uploads fine each time, yet a 1.1Mb file doesn’t. Maybe the smaller one is timing out because it’s a complete color image and the larger one has a transparent background…just BIG in size.
Hi @millionairesn
I wonder what happens when you switch the firewall mode into “Learning Mode“? Also, can you narrow down this issue to a certain image extension?
Thanks.
Hey wfalaa… thanks for responding.
We switched the firewall mode to “Learning Mode” and the same image that was having problems when it was uploaded before, still didn’t completely upload. The following message was in the error.log file:
[16-Aug-2018 20:59:03 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home1/<<directory path removed>>/wp-includes/class-wp-image-editor-imagick.php on line 362
Not sure WHY the server is now timing out when Wordfence is active…? The site is on HostGator, always has been, and we’ve never had issues like this before. But that was before migrating to their FREE SSL solution. Although as previously noted, when we DEACTIVATE Wordfence the file does upload…odd?
As for image extension… the 10+ Mb image that uploaded fine was a .PNG, single color with transparent background. The images that are NOT uploading are smaller .JPG files, just over 1 MB, but with lots of colors and FULL backgrounds.
NOTE: we just converted the .JPG image to a .PNG file, it’s size is now 2.6 MB (just over twice the size of the original file) and guess what… it uploaded fine. UGH!
So… maybe it is a file TYPE problem…?
Hopefully that helps identify a fix. Switching images to a different type is doable, but just not preferred since the file sizes jump too much.
Thanks for helping to narrow this down. Let us know if you think there is a fix, so we can get the .JPG files to upload too.
NOTE… switched the Firewall setting back to “Enable and Protecting” and the larger .PNG file once again loaded successfully. So it does look like it has something to do with the .JPG extension.
Hi @millionairesn
May I know if this happens with different .jpg images? or just a specific one? it could be something related to the image filename? try to rename this file into something else.
Thanks.
It’s happened to the original file, as is, and even after renaming it to something else. It also happens with other .jpg files too.
However, when any original file is converted to a .png (which is usually twice the size of the .jpg) the converted files ALL seem to upload just fine.
So it definitely seems to be something with the .jpg file extension.
Odd to say the least. Thanks for your help and let us know if there is anything we should try.
Hi @millionairesn
Please send us one of those “.jpg” images that caused this timeout issue to “samples [at] wordfence [dot] com” and make sure to mention that this file is not malicious but causes a timeout while uploading and paste a link to this forum thread. Our team wants to take a look at this file.
Meanwhile, you can try disabling “file_upload Malicious File Upload (Patterns)” firewall rule from (Wordfence > Firewall > Firewall Options > Advanced Firewall Options > Rules) then recheck this issue.
Thanks.
Sorry for the delay in responding, holiday week and back to school had us busy. We tried to DISABLE the suggested setting you provided above and that did NOT change anything, we still could NOT upload the .JPG files.
Two emails were sent to the address listed above. The first include 4 files that were quick screen captures that related to the error were seeing and then we attached one of our problem files. Unfortunately not the one we referenced in the error messages or the site, so that’s why we sent a second email with the image that was referenced.
Either way, both images are .JPG and won’t upload when Wordfence is active. As noted in the email, let us know if anything else is needed. Thanks!
I’m experiencing the exact same issue. I thought I was going insane. If it really is WordFence that is causing my issues, guess what… WordFence is disappearing off my sites. It’s already had to be removed from one site because of the conflicts it caused with the ChatWing chat room that the site in question used.
Thanks @millionaireson for this. I’m running the exact same configuration as you (also on Hostgator), so it is comforting to know that I’m not the only one with this problem.
UPDATE: I have just deactivated WordFence, just to see if this is actually the source of my issues… The image that I’ve been fighting with all morning uploaded first try. I will continue to run with “deactivated WordFence”, just to test if any further issues arise. If this deactivation solves my problems, I will be deleting the plugin and looking for an alternative. I can’t have a plugin installed that’s going to have erratic behavior and give me nightmares when I’m just wanting to write a quick blog post.
Hey Judy… we have no idea what happened, but all is working fine again. Since we first opened this topic we have updated many plugins, including WordFence, and we’ve also moved our site to a newer HostGator account…ugh…the new account has it’s own issues, but that’s another long story.
Anyway, all is working fine now and like so many other software issues we’ve seen over the years, we have no idea what fixed it. At least for now WordFence and everything else, file uploads included, are all working fine.
We’ll cross our fingers that yours fixes itself too.