Handling "XForms error: Unable to retrieve XForms engine state from session cache."

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Handling "XForms error: Unable to retrieve XForms engine state from session cache."

Larry T. Chen
Fellow Orbeon Forms Users,

Recently there was a question regarding this issue, but there seemed to be no working solution yet. 
When the session times out, the familiar error "XForms error: Unable to retrieve XForms engine state from session cache." shows up in red.
The only way to fix this that I know so far is to do a Shift-Reload on the page. 

Obviously telling users to do a Shift-Reload will not be satisfactory in a production environment.  How is everyone
handling this right now?  Are there any working solutions that are useable and deployable in production?

Before I was using client state handling to avoid this problem .. but I've discovered that it's much slower ...
so for performance reasons we must use session state handling.

Larry T. Chen
Intelenet Communications, Inc.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Handling "XForms error: Unable to retrieve XForms engine state from session cache."

Adrian Baker
You could have a javascript timer that fires dummy XForms submission events to keep the session alive?

If your session timeout is long (eg 20 min) it would have to fire very infrequently.

Adrian

Larry T. Chen wrote:
Fellow Orbeon Forms Users,

Recently there was a question regarding this issue, but there seemed to be no working solution yet. 
When the session times out, the familiar error "XForms error: Unable to retrieve XForms engine state from session cache." shows up in red.
The only way to fix this that I know so far is to do a Shift-Reload on the page. 

Obviously telling users to do a Shift-Reload will not be satisfactory in a production environment.  How is everyone
handling this right now?  Are there any working solutions that are useable and deployable in production?

Before I was using client state handling to avoid this problem .. but I've discovered that it's much slower ...
so for performance reasons we must use session state handling.

Larry T. Chen
Intelenet Communications, Inc.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Handling "XForms error: Unable to retrieve XForms engine state from session cache."

Alessandro Vernet
Administrator
Larry,

Also using a JavaScript timer, another approach is to take the user to
a "your session has expired" page. On that page you can explain what
happened, and provide a few links on what to do next. Optionally you
can log the user out, for additional security.

I think I prefer the method presented by Adrian, as it is more
transparent to the user. One drawback though is that if you have a lot
of people just leaving their browser open but not using the
application, you will end up keeping a lot of sessions open on the
server.

Alex

On 4/25/07, Adrian Baker <[hidden email]> wrote:

>
>  You could have a javascript timer that fires dummy XForms submission events
> to keep the session alive?
>
>  If your session timeout is long (eg 20 min) it would have to fire very
> infrequently.
>
>  Adrian
>
>
>  Larry T. Chen wrote:
>  Fellow Orbeon Forms Users,
>
>  Recently there was a question regarding this issue, but there seemed to be
> no working solution yet.
>  When the session times out, the familiar error "XForms error: Unable to
> retrieve XForms engine state from session cache." shows up in red.
>  The only way to fix this that I know so far is to do a Shift-Reload on the
> page.
>
>  Obviously telling users to do a Shift-Reload will not be satisfactory in a
> production environment.  How is everyone
>  handling this right now?  Are there any working solutions that are useable
> and deployable in production?
>
>  Before I was using client state handling to avoid this problem .. but I've
> discovered that it's much slower ...
>  so for performance reasons we must use session state handling.
>
>  Larry T. Chen
>  Intelenet Communications, Inc.
>
>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>

--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Handling "XForms error: Unable to retrieve XForms engine state from session cache."

Erik Bruchez
Administrator
Also, the "keep the session alive" method won't work for:

* Pages that are not currently displayed in the browser, i.e. when the
user goes back with his browser to an XForms page whose state has
disappeared from the session.

* Pages that expire from the session cache because other pages are used
by the same user (for example in different browser windows or tabs).

-Erik

Alessandro Vernet wrote:

> Larry,
>
> Also using a JavaScript timer, another approach is to take the user to
> a "your session has expired" page. On that page you can explain what
> happened, and provide a few links on what to do next. Optionally you
> can log the user out, for additional security.
>
> I think I prefer the method presented by Adrian, as it is more
> transparent to the user. One drawback though is that if you have a lot
> of people just leaving their browser open but not using the
> application, you will end up keeping a lot of sessions open on the
> server.
>
> Alex
>
> On 4/25/07, Adrian Baker <[hidden email]> wrote:
>>
>>  You could have a javascript timer that fires dummy XForms submission
>> events
>> to keep the session alive?
>>
>>  If your session timeout is long (eg 20 min) it would have to fire very
>> infrequently.
>>
>>  Adrian
>>
>>
>>  Larry T. Chen wrote:
>>  Fellow Orbeon Forms Users,
>>
>>  Recently there was a question regarding this issue, but there seemed
>> to be
>> no working solution yet.
>>  When the session times out, the familiar error "XForms error: Unable to
>> retrieve XForms engine state from session cache." shows up in red.
>>  The only way to fix this that I know so far is to do a Shift-Reload
>> on the
>> page.
>>
>>  Obviously telling users to do a Shift-Reload will not be satisfactory
>> in a
>> production environment.  How is everyone
>>  handling this right now?  Are there any working solutions that are
>> useable
>> and deployable in production?
>>
>>  Before I was using client state handling to avoid this problem .. but
>> I've
>> discovered that it's much slower ...
>>  so for performance reasons we must use session state handling.
>>
>>  Larry T. Chen
>>  Intelenet Communications, Inc.
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email]
>> mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>>
>
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

performance question

Peter Kolarov-2
Recently we have done some load and performance testing of our application
which uses OF  mostly for the purpose of transforming XForms to HTML (plus
couple more XSLT transforms which gives us few of our own components).
The results have been somewhat disappointing.
As most of the time, according to JProbe, is spend in the XSLT engine we
have tried to optimize all XSLT transformations which gave us only about 10%
speed increase. We are thinking the biggest increase would come from
optimizing XForms to HTML transformation.
So my question is would it make sense to try compiling this XSLT into a
translet?
If so, this is only supported for XSLT 1.0, would it be even possible to
port form XSLT 2.0 back to XSLT 1.0?

Also, is there some optimization roadmap for OF, if so what is it?

-peter




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: performance question

Alessandro Vernet
Administrator
Hi Peter,

Yes, performance is one of our top priorities You are saying that most
of the time is spent in XSLT code when generating the page. What XSLT
is that?

Orbeon Forms ships out of the box with a processor which uses the
Xalan XSLTC implementation. This will compile your stylesheets, and in
theory give you better performance. However, the drawbacks with XSLTC
is that it does not support XSLT 2.0, and also have a number of other
bugs/limitations. My experience with XSLTC dates from a couple of
years ago so things might have changed since then.

Alex

On 4/27/07, Peter Kolarov <[hidden email]> wrote:

> Recently we have done some load and performance testing of our application
> which uses OF  mostly for the purpose of transforming XForms to HTML (plus
> couple more XSLT transforms which gives us few of our own components).
> The results have been somewhat disappointing.
> As most of the time, according to JProbe, is spend in the XSLT engine we
> have tried to optimize all XSLT transformations which gave us only about 10%
> speed increase. We are thinking the biggest increase would come from
> optimizing XForms to HTML transformation.
> So my question is would it make sense to try compiling this XSLT into a
> translet?
> If so, this is only supported for XSLT 1.0, would it be even possible to
> port form XSLT 2.0 back to XSLT 1.0?
>
> Also, is there some optimization roadmap for OF, if so what is it?
>
> -peter
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>

--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: performance question

Erik Bruchez
Administrator
You may also find that XSLTC is not much faster than Saxon, although I
don't have actual numbers to back that up ;-)

Note that the XForms to XHTML transformation is not done with XSLT with
XForms NG. It is done with XSLT only with the legacy XForms engine.
Which engine are you using?

-Erik

Alessandro Vernet wrote:

> Hi Peter,
>
> Yes, performance is one of our top priorities You are saying that most
> of the time is spent in XSLT code when generating the page. What XSLT
> is that?
>
> Orbeon Forms ships out of the box with a processor which uses the
> Xalan XSLTC implementation. This will compile your stylesheets, and in
> theory give you better performance. However, the drawbacks with XSLTC
> is that it does not support XSLT 2.0, and also have a number of other
> bugs/limitations. My experience with XSLTC dates from a couple of
> years ago so things might have changed since then.
>
> Alex
>
> On 4/27/07, Peter Kolarov <[hidden email]> wrote:
>> Recently we have done some load and performance testing of our
>> application
>> which uses OF  mostly for the purpose of transforming XForms to HTML
>> (plus
>> couple more XSLT transforms which gives us few of our own components).
>> The results have been somewhat disappointing.
>> As most of the time, according to JProbe, is spend in the XSLT engine we
>> have tried to optimize all XSLT transformations which gave us only
>> about 10%
>> speed increase. We are thinking the biggest increase would come from
>> optimizing XForms to HTML transformation.
>> So my question is would it make sense to try compiling this XSLT into a
>> translet?
>> If so, this is only supported for XSLT 1.0, would it be even possible to
>> port form XSLT 2.0 back to XSLT 1.0?
>>
>> Also, is there some optimization roadmap for OF, if so what is it?
>>
>> -peter
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: performance question

Zsolt Czinkos-2
In reply to this post by Peter Kolarov-2
Hello

Could you provide some data/details about your test (if it's public)?
How much users, hardware, etc...


Thank you in advance

Zsolt


On 4/27/07, Peter Kolarov <[hidden email]> wrote:
Recently we have done some load and performance testing of our application
which uses OF  mostly for the purpose of transforming XForms to HTML (plus
couple more XSLT transforms which gives us few of our own components).
The results have been somewhat disappointing.
As most of the time, according to JProbe, is spend in the XSLT engine we
have tried to optimize all XSLT transformations which gave us only about 10%
speed increase. We are thinking the biggest increase would come from
optimizing XForms to HTML transformation.
So my question is would it make sense to try compiling this XSLT into a
translet?
If so, this is only supported for XSLT 1.0, would it be even possible to
port form XSLT 2.0 back to XSLT 1.0?

Also, is there some optimization roadmap for OF, if so what is it?

-peter




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Handling "XForms error: Unable to retrieve XForms engine state from session cache."

Marcus-2
In reply to this post by Erik Bruchez
Hi,

while i hope to get help on another thread i was searching and found this
one.
Is there a chance to catch this "XForms error - Event" and redirect to a
start page i.e.?
This point was mentioned some mails ago in this thread, but i think there
was no working solution or answer yet how this can be established!? A
redirect to a start-page showing the user the information, that his
session-time hast gone out would be great!

Best wishes,
Marcus




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Handling "XForms error: Unable to retrieve XForms engine state from session cache."

Erik Bruchez
Administrator
Marcus,

We have an RFE for this:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=306868&group_id=168&atid=350207

But no implementation yet!

We are also planning to improve the way the session cache works so that
it causes this message to appear less often. I just entered this bug,
which we have discussed recently:

http://forge.objectweb.org/tracker/index.php?func=detail&aid=307056&group_id=168&atid=350207

-Erik

Marcus wrote:

> Hi,
>
> while i hope to get help on another thread i was searching and found
> this one.
> Is there a chance to catch this "XForms error - Event" and redirect to a
> start page i.e.?
> This point was mentioned some mails ago in this thread, but i think
> there was no working solution or answer yet how this can be
> established!? A redirect to a start-page showing the user the
> information, that his session-time hast gone out would be great!
>
> Best wishes,
> Marcus
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Handling "XForms error: Unable to retrieve XForms engine state from session cache."

Marcus-2
Hi,
thanks for the notice, please let me know as soon as there might be a
working solution.
In between, is there a way to enable a longer session period for a singel
form page for inserting data to the db?
For our webapp we have one very hugh page for entering data and it may be
that it tooks quite long to insert all nessesary data and when then the
session has become invalid all work will be lost, wouldn't it? Is it
possible to save the data anyway, cause the submission and save.xpl needs
the session data i think :-(

Or is the only way at the moment just to save the data in more than one
step. Just open a new document and save it and then saving new data step by
step like make changes and apply them from time to time... i miss the right
words, hope you understand what i'm trying to explain :-)

Thanks, Marcus


----- Original Message -----
From: "Erik Bruchez" <[hidden email]>
To: <[hidden email]>
Sent: Thursday, May 17, 2007 6:32 PM
Subject: Re: [ops-users] Handling "XForms error: Unable to retrieve XForms
engine state from session cache."


> Marcus,
>
> We have an RFE for this:
>
> http://forge.objectweb.org/tracker/index.php?func=detail&aid=306868&group_id=168&atid=350207
>
> But no implementation yet!
>
> We are also planning to improve the way the session cache works so that
> it causes this message to appear less often. I just entered this bug,
> which we have discussed recently:
>
> http://forge.objectweb.org/tracker/index.php?func=detail&aid=307056&group_id=168&atid=350207
>
> -Erik
>
> Marcus wrote:
>> Hi,
>>
>> while i hope to get help on another thread i was searching and found
>> this one.
>> Is there a chance to catch this "XForms error - Event" and redirect to a
>> start page i.e.?
>> This point was mentioned some mails ago in this thread, but i think
>> there was no working solution or answer yet how this can be
>> established!? A redirect to a start-page showing the user the
>> information, that his session-time hast gone out would be great!
>>
>> Best wishes,
>> Marcus
>>
>
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>
>

--------------------------------------------------------------------------------


>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Handling "XForms error: Unable to retrieve XForms engine state from session cache."

Alessandro Vernet
Administrator
Hi Marcus,

On 5/21/07, Marcus <[hidden email]> wrote:
> For our webapp we have one very hugh page for entering data and it may be
> that it tooks quite long to insert all nessesary data and when then the
> session has become invalid all work will be lost, wouldn't it? Is it
> possible to save the data anyway, cause the submission and save.xpl needs
> the session data i think :-(

In this case session expiration is not based on time, but on size. So
allowing for a larger session might solve or at least alleviate the
problem. You can change this in properties.xml; look for
oxf.xforms.cache.session.size which by default is set to 500 KB. You
can try to increase it to a few MB.

Alex
--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws