I hate asking a vague question like this but I'm really at loss as to my current problem. I'm setting up a new site and image uploads fail on my production site (both in custom and content type forms). The failure occurs when a file is sufficiently large (greater than ~4mb). I believe the failure has more to do with something timing out rather than a limit to file size. At my office where the connection is good I can upload an 8mb image but on my slower home connection I can't upload more than a 4mb image. The upload seems to consistently timeout at about 20 seconds.

When the upload fails the form itself doesn't provide any feedback. The little blue spinner just disappears and the remove button never appears. The only feedback I receive is through the browser's console. I'm getting a HTTP Result Code: 400 error. Paths are good because like I said I'm able to successfully upload when the image or file is sufficiently small.

My relevant php settings are:

max_execution_time 300
max_input_time -1
post_max_size 18M
upload_max_filesize 16M

I'm able to confirm these php settings through a phpinfo.php page so I'm reasonably confident it's not this.

I'm running Drupal 8.7.6 on CentOS7 with PHP 7.2.21.

Does anyone have a good guess as to what my problem could be? I'm sorry this is vague and most likely not an issue with Drupal. Thanks, I appreciate any hints you might provide.

  • If you're using Chrome, try a different browser – Clive Aug 12 '19 at 15:43
  • Worth checking memory_limit as well. – Alfred Armstrong Aug 12 '19 at 15:48
  • Memory limit is 128M, which I can also verify through the phpinfo.php page. – mrlexington Aug 12 '19 at 16:54
  • QA) From your MySQL Command Prompt, what is the result of SELECT @@max_allowed_packet; ? QB) Are you using the same browser at home as at work? – Wilson Hauck Aug 15 '19 at 20:25
  • The max_allowed_packet reports as 268435456. Does this seem out of place? Thanks. – mrlexington Aug 21 '19 at 20:41

Set your max_execution_time 300 to -1 which is unlimited or can increase according to your need. And memory_limit to 1024M or more.

  • Thanks but unfortunately, it's no the php settings causing my issues. – mrlexington Aug 21 '19 at 20:42
  • Please post the complete content of your php.ini for analysis. – Wilson Hauck Sep 1 '19 at 18:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.