Re: Blocking long response in 5.2.4
Re: Blocking long response in 5.2.4
- Subject: Re: Blocking long response in 5.2.4
- From: Chuck Hill <email@hidden>
- Date: Thu, 12 May 2005 10:58:45 -0700
On May 12, 2005, at 12:25 AM, Thomas wrote:
As always, writing the message sparked some ideas, and I've worked it
out.
One thing I didn't notice is that the calculation thread was using
some EOs that were passed to it, and was fetching some related EOs--
from the editing context of the original page.
Just to test this, I fetch the same objects from the thread's EC
(using the primary key) and that solves the problem, but it's slower.
I vaguely recall that you can move an object to a new EC without
refetching it from the database, but I can't find it in the docs.
Could some kind soul please remind me?
And one last question, probably rhetorical-- why did it work all these
years, and stop working in 5.2.4?
Check the release notes. There was a change to locking of the default
EC. Perhaps that is related to this.
Chuck
On 12/05/2005, at 16:32, Thomas wrote:
For many years I have had a number of computationally-intensive
calculations performed in a separate thread using a modified version
of WOLongResponsePage. The pages reloaded every 10 seconds, sometimes
for hours, and happily served up the final result.
Now in WO 5.2.4, the responses stop after a small but apparently
random number of reloads. The calculation thread keeps running, but
the application no longer responds to HTTP requests, even after the
calculation is finished and the thread deleted.
I thought it might be an editing context lock issue, but I've tried
using a new EC for the thread, with no change.
One clue is that it would never even serve the first long response
status page, until I added a one-second sleep near the start of the
calculation thread, which gave the application time to serve the
first page. After that it sometimes serves a few refreshes then gets
stuck.
Of course Apple's Long Response example works fine, even when I move
the code into my application, but it does nothing with EO objects.
I had an idea it might be the communication between the thread and
the page (updating the status), but even with that disabled, the same
thing occurs.
Any ideas would be greatly appreciated.
Thomas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net
This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden