[Glass] Nginx , FastCGI and GLASS problem

Mariano Martinez Peck marianopeck at gmail.com
Mon Nov 25 17:46:32 PST 2013


HI john,

Thanks for the suggestion. I have commented those lines but still same
problem :(

I attach an screenshot of the web developer. As you can see, there is a GET
and a POST. The post takes always 1 minute.

Sometimes the delay is in a GET, not a POST....




On Mon, Nov 25, 2013 at 10:02 PM, John McIntosh <
johnmci at smalltalkconsulting.com> wrote:

>
> Ok well maybe it's the compression bug?
>
>
> WAFastCGIAdaptor>>responseFrom: ....
>
> -- comment out the Content-length attribute...
>
> "*** FastCGI 2.4.4 and 2.4.6 have a bug in which Content-length for
> compressed data
> is reported at the uncompressed length. This often causes significant
> delays while
>  the client browser waits to get the remaining data. Although
> content-length should
> be supplied by the HTTP server to the client, the FastCGI solution is to
> drop it!
>  See
> http://mailman.archlinux.org/pipermail/arch-commits/2009-September/061891.html
> .
>  nextPutAll: 'Content-length: ';
> nextPutAll: contents size printString;
> nextPutAll: crlf;"
>
>
>
> On Mon, Nov 25, 2013 at 6:33 PM, Mariano Martinez Peck <
> marianopeck at gmail.com> wrote:
>
>> Also, when I see that 1-minute request in the browser development tools,
>> it appears like 2ms receiving, 1 minute waiting...weird!
>>
>>
>> On Mon, Nov 25, 2013 at 8:26 PM, Mariano Martinez Peck <
>> marianopeck at gmail.com> wrote:
>>
>>> HI guys. This is the first time I am trying to use FastCGI. For some
>>> reason, i have a timeout with fastCGI.
>>> I started the Gems either with:
>>>
>>>
>>> WAGemStoneRunSeasideGems default
>>>         name: 'FastCGI';
>>>         adaptorClass: WAFastCGIAdaptor;
>>>         ports: #(9001 9002 9003).
>>> WAGemStoneRunSeasideGems restartGems.
>>>
>>> (from GemTools) or from command line:
>>>
>>> ./startSeaside_FastCGI 9001
>>>
>>> In either case, what happens is that I can browse my app
>>> http:localhost:9001/dp (and 9002 and 9003). But when I do a request to the
>>> server trough my FastCGI, it takes ONE MINUTE to load the page. I am using
>>> Nginx in the backend with this configuration:
>>>
>>>     upstream seaside
>>>       {
>>>         server localhost:9001;
>>>         server localhost:9002;
>>>         server localhost:9003;
>>>       }
>>>
>>>       server
>>>       {
>>>
>>> listen 33300;
>>> server_name localhost;
>>>         root /var/www/glass/;
>>>
>>>
>>>     access_log  /var/log/nginx/fastCGI.log;
>>>     error_log  /var/log/nginx/error.log info;
>>>
>>>         location /
>>>         {
>>>             try_files $uri @seaside;
>>>   #  error_page 403 404 = @seaside;
>>>         }
>>>
>>>         location @seaside
>>>         {
>>>           include fastcgi_params;
>>>           fastcgi_pass seaside;
>>>         }
>>>       }
>>>
>>>
>>> Using the webtools of the browser, I see that each time I go to a page,
>>> there is either a GET or a POST that takes exactly 1 minute. I
>>> mean...nothing happens, until one minute passes and then the page is
>>> rendered. The requests are small.  And in fact, browsing directly to
>>> 9001/2/3 works perfectly. So I guess this is a one minute timeout of
>>> something.
>>>
>>> For what I can see, it could be related to the
>>>
>>>  keepalive_timeout  65;
>>>
>>> And in nginx error.log I see something like:
>>>
>>> 2013/11/25 17:38:18 [error] 22835#0: *73 upstream timed out (60:
>>> Operation timed out) while reading response header from upstream, client:
>>> 127.0.0.1, server: localhost, request: "GET /dp HTTP/1.1", upstream:
>>> "fastcgi://127.0.0.1:9001", host: "localhost:33300"
>>> 2013/11/25 17:38:18 [info] 22835#0: *73 kevent() reported that client
>>> 127.0.0.1 closed keepalive connection
>>>
>>> Any ideas what could be wrong?
>>>
>>>
>>> Thanks!
>>>
>>> --
>>> Mariano
>>> http://marianopeck.wordpress.com
>>>
>>
>>
>>
>> --
>> Mariano
>> http://marianopeck.wordpress.com
>>
>> _______________________________________________
>> Glass mailing list
>> Glass at lists.gemtalksystems.com
>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>>
>>
>
>
> --
> ===========================================================================
> John M. McIntosh <johnmci at smalltalkconsulting.com>
> Corporate Smalltalk Consulting Ltd. Twitter: squeaker68882
> ===========================================================================
>
>


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20131125/2471fdd4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2013-11-25 at 10.36.15 PM.png
Type: image/png
Size: 52046 bytes
Desc: not available
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20131125/2471fdd4/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2013-11-25 at 10.32.54 PM.png
Type: image/png
Size: 50208 bytes
Desc: not available
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20131125/2471fdd4/attachment-0003.png>


More information about the Glass mailing list