1

I'm trying to post Base64 encoded images within one JSON to a grails 3.1.4 backend. When the JSON reached a size greater 2 MB the POST operation fails. The controller won't be called due to a broken connection pipe.

I assume that this behavior is a result of the default maxPostSize constraint of the embedded tomcat.

I've already set the maxFileSize and maxRequestSize parameter due to previous trouble with uploading big files. But these values doesn't affect the handling of large JSON.

controllers:
    upload:
      maxFileSize: ...
      maxRequestSize: ...

How could I set the maxPostSize value for the embedded tomcat used by grails? I know how to set on standalone tomcat - but I also want to configure it for my dev environment

aiolos
  • 4,637
  • 1
  • 23
  • 28
  • Grails 3 is based on Spring Boot, so following solution http://stackoverflow.com/questions/33232849/increase-http-post-maxpostsize-in-spring-boot should work for you – practical programmer May 24 '16 at 13:45
  • I already found this answer but hoped that there is another way to do that. – aiolos May 25 '16 at 09:01

0 Answers0