I found a fix for this problem at this page on the Rackcorp site. It has to do with increasing the fastcgi buffer size in the fastcgi_params file with nginx. However, now I am curious how big the buffer is when coming from a page created with the Image Gallery module. Finding out that information is beyond me, and if possible, I would like to ensure that my buffers are not overly large in my configuration.
To summarize the Rackcorp article, just add the following lines to your fastcgi_params file and restart nginx.
Well, I played around with the entries trying out values and came up with the following shorter list of configuration entry values that are much smaller than the Rackcorp values and still work. If anyone is familiar with nginx and can tell me if these are reasonable it would be great.
thanks for your post, i had same problem with nginx with silverstripe.. your quick fix saved my day..
Looks like the default nginx setting wont allow big respond header with quite big content using ajax call.