On 2011-04-04, at 8:43 PM, Mike Schrag wrote: > WO supports multiple concurrent requests, but EOF has a single lock per EOF > stack. If I were you, I'd break the request apart from the process -- is > something seriously going to sit for 30 minutes waiting for this? What if > they accidentally drop their browser connection? Then they're screwed. > Instead make it asynchronous and email them a notification to retrieve the > results or something. Then execute this in a second objectstorecoordinator, > so you don't block the primary OSC (ERXEC.newEditingContext(new > EOObjectStoreCoordinator()).
Sorry, I should have mentioned that the long request is a cronjob. > > ms > > On Apr 4, 2011, at 8:37 PM, Kevin Hinkson wrote: > >> Hi all, >> I am a bit puzzled about how WO handles concurrent requests. >> >> I have a request that can run for a very long time, let's say 30 minutes. >> After looking around at other posts, the options for allowing this to run >> without the adaptor and apache complaining after a minute or so are: >> >> * implement WOLongResponsePage >> * Adjust the adaptor timeout settings >> * make it run faster >> >> Since I could not make the data crunching any faster and I'm lazy, I opted >> to adjust the adaptor timeout settings. This worked fine I thought. >> >> I am also running my app with the argument >> -WOAllowsConcurrentRequestHandling=YES (among others settings) which I >> thought would mean that one instance can handle multiple incoming requests. >> But that does not seem to be the case. My app is running with one local >> instance that should allow concurrent request handling but that one request >> (the long running one) blocks, preventing others from running (they just >> timeout). My solution has been to just add another instance and then >> schedule them to restart 12 hours apart. >> >> So, my questions. >> >> 1. Is changing the adaptor timeout setting the best option or is >> WOLongResponse inherently better in some way? >> 2. What does WOAllowsConcurrentRequestHandling do or not do? Did I >> misunderstand this argument? >> 3. Why do we have to schedule restarts of instances? I suspect it has to do >> with memory usage but I've never seen a clear answer on this. >> 4. How many instances should I really be running per app? Maybe some >> examples of how you guys handle deciding how many to run would be great. >> >> Thanks. _______________________________________________ >> Do not post admin requests to the list. They will be ignored. >> Webobjects-dev mailing list ([email protected]) >> Help/Unsubscribe/Update your Subscription: >> http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40pobox.com >> >> This email sent to [email protected] > _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
