Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

nginx and ImageGallery [solved]


Reply

4 Posts   2995 Views

Avatar
taligent

19 May 2010 at 9:50pm (Last edited: 20 May 2010 2:15am), Community Member, 18 Posts

I have an install of SilverStripe 2.4.0 and have also installed swfupload, dataobjectmanager, and imagegallery. After trying to create a new Image Gallery page I get the following popup window:

<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/0.7.65</center>
</body>
</html>

I am running SilverStripe on an nginx server. Please note that this is a duplicate question to another already posted in the General Questions forum (http://www.silverstripe.org/general-questions/show/279081#post279081), but since I am not the owner of the thread I can't move it to this forum where I believe it belongs.

Avatar
taligent

20 May 2010 at 2:14am Community Member, 18 Posts

I found a fix for this problem at this [url=http://blog.rackcorp.com/?p=14]page[/url] 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.

fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_intercept_errors on;

If somebody finds smaller values that work, please let me know.

Avatar
taligent

20 May 2010 at 2:55am Community Member, 18 Posts

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.

fastcgi_buffer_size 32k;
fastcgi_buffers 4 32k;
fastcgi_busy_buffers_size 64k;

Avatar
SSadmin

28 August 2011 at 11:41pm Community Member, 90 Posts

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.