I'm setting up a Drupal 8 website and I can't seem to upload images beyond 3.5mb on my production server. My local development environment has no issue with uploading images to the 16mb limit I set in php.ini.

Since I'm working in Drupal, which is of course PHP, you might assume the limitation is coming from the PHP settings. However, in my php.ini I have upload_max_filesize = 16M, post_max_size = 18M and max_execution_time = 300. I'm able to confirm this in a phpinfo() print out.

Also I can upload files below 3.5mb just fine so I don't believe it's permissions either.

I'm pretty sure it's not Drupal, PHP nor permissions getting in the way. Does anyone have any idea as to what might be another area to look? I'm running Centos7 with of course Apache2.


  • 2
    What error(s) do you get? Is this your own server? – MrWhite Aug 5 '19 at 21:45
  • Error1: [Mon Aug 05 22:10:38.580719 2019] [lsapi:error] [pid 2101:tid 47504397784832] [client xx.xx.xxx.xx:52141] [host www.example.com] get_client_block(16384) failed, referer: http://www.example.com/blog/post/general – mrlexington Aug 6 '19 at 2:23
  • Error 2: [Mon Aug 05 22:10:38.580803 2019] [lsapi:error] [pid 2101:tid 47504397784832] [client xx.xx.xxx.xx:52141] [host www.example.com] Client error on sending request(POST /blog/post/general?element_parents=field_blog_featured_image/widget/0&ajax_form=1&_wrapper_format=drupal_ajax HTTP/1.1); uri(/index.php?element_parents=field_blog_featured_image/widget/0&ajax_form=1&_wrapper_format=drupal_ajax) content-length(6813250): user_get_body(tmpstackbuf, 16384): read from client failed, referer: http://www.example.com/blog/post/general – mrlexington Aug 6 '19 at 2:25
  • The errors seem to hint at my losing connection to the server but I'm not sure. – mrlexington Aug 6 '19 at 2:26
  • Drupal can handle files over 3.5mb, it depends on the PHP settings (max upload size, max php memory, for example). As you say, it seems the connection is not working properly. As the file is bigger, you need more time to upload it so more changes of having a network error. – sanzante Sep 5 '19 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.