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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

nginx and ImageGallery [solved]


Go to End


4 Posts   5388 Views

Avatar
taligent

Community Member, 18 Posts

19 May 2010 at 9:50pm

Edited: 20/05/2010 2:15am

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

Community Member, 18 Posts

20 May 2010 at 2:14am

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.

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

Community Member, 18 Posts

20 May 2010 at 2:55am

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

Community Member, 90 Posts

28 August 2011 at 11:41pm

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.