durusmail: quixote-users: Non-reproducible problem: get_request() returns None
Non-reproducible problem: get_request() returns None
Non-reproducible problem: get_request() returns None
2005-01-24
Non-reproducible problem: get_request() returns None
2005-01-24
2005-01-24
Non-reproducible problem: get_request() returns None
Daniele Varrazzo
2005-01-24
Hi David,

sorry for sending you twice the same message: am i too much a lamer or does
the fact the message return path is set to the message author confuse you?
Can the mailing list be set with "quixote-users at mems-exchange dot org" as
return path?

Anyway i added something, so, please read on :)

> Are threads involved here?  This acts like two threads have
> overlapping publish calls.

it looks to me a concurrency issue too. I use the standard Apache 2 for
Windows configuration. In httpd.conf there is a


ThreadsPerChild 250
MaxRequestsPerChild  0


mpm_winnt is not in the LoadModule list, but i think apache2 is compiled
with it, so these directive should be in effect. My application is not
multi-threaded.

Shooting about 10 request per second doesn't break any page. I shall try
with a long redirect chain.

Thank you,

Daniele

P.S. I wrote such script. What i did is a published module with:

from quixote import get_user, get_request, redirect
counter = 0
def gotoself(request):
    global counter
    counter += 1
    if counter >= 1000:
        raise "IAmSoTiredOfThisSillyGameError"

    user = get_user()
    req = get_request()
    assert req is not None

    return redirect("gotoself")

The script ran in 4 seconds, that's 250 req/s. It halted on the exception:
the request was never None. So i still can't reproduce :(

Goodbye

Daniele

> -----Messaggio originale-----
> Da: David Binger [mailto:dbinger@mems-exchange.org]
> Inviato: lunedi 24 gennaio 2005 17.51
> A: Titus Brown
> Cc: quixote-users@mems-exchange.org; Daniele Varrazzo
> Oggetto: Re: [Quixote-users] Non-reproducible problem: get_request()
> returns None
>
>
>
> On Jan 24, 2005, at 11:24 AM, Titus Brown wrote:
>
> > ->     session = _publisher.get_request().session
> > -> AttributeError: 'NoneType' object has no attribute 'session'
> >
>
> The problem here is not that the request doesn't have
> a session, but worse, that the request is None.
>
> Are threads involved here?  This acts like two threads have
> overlapping publish calls.


reply