Massimo, as I said, there are 2 processes. The background process is a
queueing engine. The queue is doing stuff like you describe: creating
and deleting records and writing out to a log file. However, the queue
is running just fine and doesn't have the "print a.xxx" statement that
you flag as the culprit above.

The problem is with the "show()" controller function that outputs to
the browser a display of the current status of the queue. All it does
is create an SQLTable from a query and then display the results in a
view. The queue and show processes are completely separate.

Any more thoughts?

On Sep 26, 9:57 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
> somehow you are doing something like this
>
> a=db.mytable.insert(myfield='xxx')
> del db.mytable[a]
> print a.xxx  ### <<< your error
>
> The problem should only exist if the three statements happen in the
> same process because of transactions.
>
> On Sep 26, 3:38 am, weheh <richard_gor...@verizon.net> wrote:
>
> >   File "C:\web2py\gluon\sql.py", line 1501, in __allocate
> >     raise RuntimeError, "Using a recursive select but encountered a
> > broken reference"
> > RuntimeError: Using a recursive select but encountered a broken
> > reference
>
> > I encountered this problem trying to do a select and display in the
> > browser, while simultaneously running a background job that updates
> > the db. If I refresh the browser, sometimes I get the error and
> > sometimes I don't. Seems like a locking problem. I am not using a cron
> > task. I am running a separate python web2py.py using the -S -M and -R
> > options.
>
>

Reply via email to