To be clear, I don't think it is this abandon session code that is the
problem. On our test server (indentical to the production server with
the issue), restarting the server and calling a different site that
calls the abandon session, but does not package it and write it to the
database, a zombie is created immediately.
The housekeeper is not running as it should.
There are no errors in the error log.
On 8/21/07, Michael Check <[EMAIL PROTECTED]> wrote:
> Using A4D 402 and 4D 2004.5 server/client on OSX.3.9
>
> We have a site that members use to change their registrations and
> personal data. This site, as far as we know, has been running OK for
> about 6mo, but now has started to accumulate zombies and not clean
> sessions correctly.
>
> We do have On Abandon Session code running that saves the session to a
> blob and to their record. The record is unloaded after the query/save
> happens.
>
> With zombies created, the Abandon Session code is not being run. And
> therefore the sessions are not being saved. Ugh.
>
> We have log level 7 and have examined the error log to see if there
> are syntax errors, there are none that we can see.
>
> So my questions are this:
> * Can we jumpstart the housekeeper to clean up the sessions properly
> * If so, is there ANY possibility that save session code will run and
> save the data?
> * How can we troubleshoot/solve this issue?
>
> FROM Active4D.a4l
> method "On Session End"
>
> if (session has("sessionType"))
> case of
> :(session{"sessionType"}="PRDU")
> PR_Lib.saveSession
> PR_dataUpdate.clearGlobals
> :(session{"sessionType"}="PR_APP")
> PR_Lib.saveAPPSession
> PR_application.clearAppGlobals
> end case
> end if
>
> end method
>
>
> FROM PR_Lib.a4l
> method "saveSession"
> if(session{"state"}#"Read Only") //only save the session if
> the
> update wasn't already submitted
> if(session{"Modified"})
> C_blob($sessionBlob)
>
> $sessionBlob:=PR_SessionConvert.sessionToBlobObject
>
> query([WebPortal];[WebPortal]TypeID =
> num(session{"personID"}))
> if (records in selection([WebPortal])=0)
> // get a new highest index number and
> increment by 1
>
> // wait if another app id is being
> retrieved
> while (semaphore("prdus_create.load"))
> // wait
> end while
>
> c_longint($id)
>
> READ ONLY([webportal])
> SCAN INDEX([webportal]webportalID;1;<)
> $id:=[webportal]webportalid+1
>
> //create the new account
> create record ([WebPortal])
> [webportal]webportalID:=$id
> [WebPortal]Created:=current date
> [WebPortal]Type:="PRDUS"
>
> [WebPortal]TypeID:=num(session{"personID"})
>
> [WebPortal]TypeLabel:=session{"person"}{"last"}{1} + ", " +
> session{"person"}{"first"}{1}+" ("+session{"peerReviewIDNum"}+")"
> [WebPortal]Session:=$sessionBlob
> [WebPortal]modified:=current date
> save record ([WebPortal])
>
> clear semaphore("prdus_create.load")
>
> else
>
> if(a4d.utils.unlockAndLoad(->[WebPortal]))
>
> [WebPortal]Session:=$sessionBlob
> [WebPortal]modified:=current
> date
> save record ([WebPortal])
> end if
> end if
> unload record([WebPortal])
> session{"Modified"}:=false
> end if
> end if
> end method
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/