[plt-scheme] plt web-server: adjust-timeout! ?

From: Hans Oesterholt-Dijkema (hdnews at gawab.com)
Date: Thu Jun 28 19:37:43 EDT 2007

What I actually see, is the initial-connect-timeout value reset my servlet.
It times out and resets my servlet.

Am I doing something wrong in my servlet code?

--Hans

        (define (hwiki-start request set-timeout)
         
          (if INSTALL-PLUGINS
              (begin
                (debug "Installing plugins")
                (let ((f (dynamic-require "hwiki-plugins.scm" 
'install-plugins)))
                  (debug (format "dynamic require of 'hwiki-plugins.scm' 
results in ~a" f))
                  (f)
                  (set! INSTALL-PLUGINS #f))))
         
          (debug "START" (url->string (request-uri request)))
          (let ((context (get-context request)))
           
            (set-timeout context)
           
            (let ((P (page context)))
              (let ((function (if (or (-> P special?) (-> context 
logged-in?))
                                  send/suspend
                                  send/forward)))
                (if (not (-> P special?))
                    (-> context from-where (-> context page-name)))
                (debug "special?" (-> P special?) " function: " function 
" context:" (-> context context))
                (let ((R (-> P create-html)))
                  (debug "calling " R)
                  (let ((B (function R)))
                  (debug "RESTART" R function B)
                    (hwiki-start B set-timeout)))))))


Hans Oesterholt-Dijkema schreef:
> The timeout occurs every 30 seconds. As configured in the 
> configuration file:
>
> (default-servlet-timeout 30)
>
> ?
>
> I see "revise-timer" gets called after my servlet has been run with a 
> value
> of 30. Also, within a send/suspend situation. My web server config is set
> to 3600 seconds, so I won't notice much over there. But I want to shorten
> the servlet existence to let's say 120 seconds and when doing edit session
> set it to like 3 hours.
>
> How does it work?
>
> --Hans
>
>
> Hans Oesterholt-Dijkema schreef:
>> How, wait. I get this message:
>>
>> http://localhost/servlets;4*1*1739593/hwiki.scm/special:edit.html?context=
>>
>>
>>   Not Found
>>
>> Couldn't find what you were looking for. Sorry.
>>
>> Also when I set the initial value of the timeout to 120 or 1200.
>> After about just as much time.
>>
>> Any ideas?
>>
>> --Hans
>>
>>
>> Hans Oesterholt-Dijkema schreef:
>>> Dear Jay,
>>>
>>> Thanks for the answer. I've seen the code.  adjust-timeout! is called
>>> with the timeout value of the servlet just before the servlet is 
>>> started.
>>>
>>> However, when I call adjust-timeout! from the servlet itself, somehow,
>>> it doesn't work. Suppose I put the value to * 3 3600 (3 hours), I still
>>> get an expiration after the initial 120 seconds (or maybe even faster).
>>>
>>> I'm debugging your 360 code (just getting to revise-timer), but I'm
>>> still not seeing why it doesn't work.
>>>
>>> What could be wrong?
>>>
>>> --Hans
>>>
>>>
>>> Jay McCarthy schreef:
>>>> adjust-timeout! does not change the timeout variable. It communicates
>>>> an update to the internal timeout counter. The timeout variable should
>>>> really have been named 'initial-timeout', but it is too late.
>>>>
>>>> Jay
>>>>
>>>> On 6/28/07, Hans Oesterholt-Dijkema <hdnews at gawab.com> wrote:
>>>>> Hi there,
>>>>>
>>>>> I'm trying to use adjust-timeout! to control the timeout
>>>>> behaviour of a module type servlet in the mzscheme
>>>>> web-server.
>>>>>
>>>>> However, adjust-timeout! doesn't seem to be working.
>>>>> Whatever I use as a value. The value of the timeout variable
>>>>> stays the same.
>>>>>
>>>>> What should I do to make this work?
>>>>>
>>>>> --hans
>>>>>
>>>>> _________________________________________________
>>>>>   For list-related administrative tasks:
>>>>>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>>>>
>>>>
>>>>
>>> _________________________________________________
>>>  For list-related administrative tasks:
>>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>>
>>>
>> ------------------------------------------------------------------------
>>
>> _________________________________________________
>>   For list-related administrative tasks:
>>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>   
> ------------------------------------------------------------------------
>
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070629/001bf2d6/attachment.html>

Posted on the users mailing list.