Re: Occasional hang loading a particular large page

2011-07-20 Thread Kevin

On Jul 18, 2011, at 4:35 PM, Simon wrote:

 Have you tried using ERXBatchFetching stuff?
 
 I use ERXBatchingDisplayGroup for large pages and it has worked well.
 
 No I haven't. When it works, the page loads pretty quickly, faster than I 
 would have expected. If I can just track down what causes the occasional 
 hang and fix that, then everyone will be happy.
 
 we **always** use ERXBatchingDisplayGroup - doesn't matter if we're
 intend to fetch 5 objects or 50,000.
 
 we just assume that one day that someone will fetch 500,000 and hence
 we might as well get it right from the start...

Probably a good idea. This particular scenario really shouldn't happen 
according to the design spec. I know what you're thinking. :-)

There is a list of items that can be selected. Normally the list is a few to 
tens of items. It was decided later by the site owner that the admin user 
should be able to enter items for any customer. So they ended up with a very 
large list. I could split it or have a menu to go by letter or some kind of 
search thing, but then it might end up being more cumbersome. It's actually 
very easy to use with a really long list, just takes a bit to load the first 
time. 

It would be cool if the page could sort of dynamically load 50 items at a time 
onto the page so that the list came up quicker but continued to load items 
while they scrolled down. I bet that could be done with some ajax goodness, but 
I haven't used any of it, and this client is cheap so if I told them they'd 
need to pay for the time it wouldn't get approved anyway.

- Kevin ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Occasional hang loading a particular large page

2011-07-20 Thread Chuck Hill

On Jul 20, 2011, at 7:12 PM, Kevin wrote:

 
 On Jul 18, 2011, at 4:35 PM, Simon wrote:
 
 Have you tried using ERXBatchFetching stuff?
 
 I use ERXBatchingDisplayGroup for large pages and it has worked well.
 
 No I haven't. When it works, the page loads pretty quickly, faster than I 
 would have expected. If I can just track down what causes the occasional 
 hang and fix that, then everyone will be happy.
 
 we **always** use ERXBatchingDisplayGroup - doesn't matter if we're
 intend to fetch 5 objects or 50,000.
 
 we just assume that one day that someone will fetch 500,000 and hence
 we might as well get it right from the start...
 
 Probably a good idea. This particular scenario really shouldn't happen 
 according to the design spec. I know what you're thinking. :-)
 
 There is a list of items that can be selected. Normally the list is a few to 
 tens of items. It was decided later by the site owner that the admin user 
 should be able to enter items for any customer. So they ended up with a very 
 large list. I could split it or have a menu to go by letter or some kind of 
 search thing, but then it might end up being more cumbersome. It's actually 
 very easy to use with a really long list, just takes a bit to load the first 
 time. 
 
 It would be cool if the page could sort of dynamically load 50 items at a 
 time onto the page so that the list came up quicker but continued to load 
 items while they scrolled down. I bet that could be done with some ajax 
 goodness, but I haven't used any of it, and this client is cheap so if I told 
 them they'd need to pay for the time it wouldn't get approved anyway.

There is nothing in Ajax.framework that is quite that fancy.

-- 
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects









smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Occasional hang loading a particular large page

2011-07-18 Thread Chuck Hill

On 2011-07-17, at 10:05 PM, Kevin wrote:

 
 On Jul 13, 2011, at 5:21 PM, Kevin wrote:
 
 I have an app that tends to lock up when a particular page is loaded. This 
 page fetches and accesses over 1500 records from a FrontBase DB. When the 
 problem happens I typically see a broken socket in the webobjects log file, 
 and if I look in the FB manager the state column shows tb swp where the 
 others show only swp. Also CPU usage is quite high when in this state. It 
 will stay this way until I kill it, or the app dies. If I kill that 
 transaction and try again, most of the time it will work fine. Sometimes I 
 have to restart the app.
 
 SQL is not my strong suit, but after checking the SQL log and not finding 
 anything unusual, I ended up upgrading to the latest FrontBase5. Previously I 
 was running version 4. The upgrade required exporting to flat files and 
 reimporting, but that was a pretty smooth process. I'm not sure but I think 
 the export and import may have been the fix, not necessarily the upgrade.

That would have fixed corrupt indexes and any lack of optimization (see 
Optimize Database; command).


 The page now works fine. It takes a while to load the first time, but 
 subsequent loads are quick. I think it was probably doing that before as well 
 when it worked, I just didn't see that behavior myself since I was always 
 loading it after a user complaint. I tried to turn on some caching in FB, but 
 that didn't seem to make a difference. I think the way the page is built 
 requires creating a lot of objects in WO so the first load suffers. 
 
 Any pointers on how to circumvent creating all those objects would be 
 helpful. Not sure if that's possible in this case, but I'd bet some of you 
 have tricks up your sleeves for that sort of thing.


I don't think we can offer any pointers without more details.


Chuck


-- 
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific 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  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Occasional hang loading a particular large page

2011-07-18 Thread Simon
 Have you tried using ERXBatchFetching stuff?

 I use ERXBatchingDisplayGroup for large pages and it has worked well.

 No I haven't. When it works, the page loads pretty quickly, faster than I 
 would have expected. If I can just track down what causes the occasional hang 
 and fix that, then everyone will be happy.

we **always** use ERXBatchingDisplayGroup - doesn't matter if we're
intend to fetch 5 objects or 50,000.

we just assume that one day that someone will fetch 500,000 and hence
we might as well get it right from the start...

simon
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Occasional hang loading a particular large page

2011-07-17 Thread Kevin

On Jul 13, 2011, at 5:21 PM, Kevin wrote:

 I have an app that tends to lock up when a particular page is loaded. This 
 page fetches and accesses over 1500 records from a FrontBase DB. When the 
 problem happens I typically see a broken socket in the webobjects log file, 
 and if I look in the FB manager the state column shows tb swp where the 
 others show only swp. Also CPU usage is quite high when in this state. It 
 will stay this way until I kill it, or the app dies. If I kill that 
 transaction and try again, most of the time it will work fine. Sometimes I 
 have to restart the app.

SQL is not my strong suit, but after checking the SQL log and not finding 
anything unusual, I ended up upgrading to the latest FrontBase5. Previously I 
was running version 4. The upgrade required exporting to flat files and 
reimporting, but that was a pretty smooth process. I'm not sure but I think the 
export and import may have been the fix, not necessarily the upgrade.

The page now works fine. It takes a while to load the first time, but 
subsequent loads are quick. I think it was probably doing that before as well 
when it worked, I just didn't see that behavior myself since I was always 
loading it after a user complaint. I tried to turn on some caching in FB, but 
that didn't seem to make a difference. I think the way the page is built 
requires creating a lot of objects in WO so the first load suffers. 

Any pointers on how to circumvent creating all those objects would be helpful. 
Not sure if that's possible in this case, but I'd bet some of you have tricks 
up your sleeves for that sort of thing.

Thanks,
Kevin ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Occasional hang loading a particular large page

2011-07-13 Thread Kevin
I have an app that tends to lock up when a particular page is loaded. This page 
fetches and accesses over 1500 records from a FrontBase DB. When the problem 
happens I typically see a broken socket in the webobjects log file, and if I 
look in the FB manager the state column shows tb swp where the others show 
only swp. Also CPU usage is quite high when in this state. It will stay this 
way until I kill it, or the app dies. If I kill that transaction and try again, 
most of the time it will work fine. Sometimes I have to restart the app.

Any ideas how I can track this problem down. And does anyone know what the 
letters indicate in the state field. I think there is a clue there, but I can't 
find those letters in the docs so I don't know what they indicate.

Thanks,
Kevin ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Occasional hang loading a particular large page

2011-07-13 Thread Paul D Yu
Have you tried using ERXBatchFetching stuff?

I use ERXBatchingDisplayGroup for large pages and it has worked well.

Paul
On Jul 13, 2011, at 6:21 PM, Kevin wrote:

 I have an app that tends to lock up when a particular page is loaded. This 
 page fetches and accesses over 1500 records from a FrontBase DB. When the 
 problem happens I typically see a broken socket in the webobjects log file, 
 and if I look in the FB manager the state column shows tb swp where the 
 others show only swp. Also CPU usage is quite high when in this state. It 
 will stay this way until I kill it, or the app dies. If I kill that 
 transaction and try again, most of the time it will work fine. Sometimes I 
 have to restart the app.
 
 Any ideas how I can track this problem down. And does anyone know what the 
 letters indicate in the state field. I think there is a clue there, but I 
 can't find those letters in the docs so I don't know what they indicate.
 
 Thanks,
 Kevin ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com
 
 This email sent to p...@mac.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Occasional hang loading a particular large page

2011-07-13 Thread Chuck Hill

On 2011-07-13, at 5:21 PM, Kevin wrote:

 I have an app that tends to lock up when a particular page is loaded. This 
 page fetches and accesses over 1500 records from a FrontBase DB.

As long as it is not a lot over 1,500 that should not cause a delay as 
significant at this.  Turn on SQL logging and check the log.  It could be that 
it is fetching those rows and then firing off many single row faults.  Or you 
might have a corrupt index or a unoptimizable query against a large table / 
complex joins.



 When the problem happens I typically see a broken socket in the webobjects 
 log file, and if I look in the FB manager the state column shows tb swp 
 where the others show only swp.

t means Open Transaction
b means Busy

So FrontBase is evaluating a query to return the result.  That suggests a 
corrupt index or a unoptimizable query.


 Also CPU usage is quite high when in this state.

App or database usage?


 It will stay this way until I kill it, or the app dies. If I kill that 
 transaction and try again, most of the time it will work fine. Sometimes I 
 have to restart the app.
 
 Any ideas how I can track this problem down. And does anyone know what the 
 letters indicate in the state field. I think there is a clue there, but I 
 can't find those letters in the docs so I don't know what they indicate.


Check the SQL issued from the app first.  Then try the same SQL directly in FB.


Chuck

-- 
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific 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  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Occasional hang loading a particular large page

2011-07-13 Thread David Holt

On 2011-07-13, at 3:26 PM, Paul D Yu wrote:

 Have you tried using ERXBatchFetching stuff?
 
 I use ERXBatchingDisplayGroup for large pages and it has worked well.

Speaking of ERXBatchingDisplayGroup, I just discovered there is rule support 
for it in ERD2WList pages but it is not turned on by default. Can I use this as 
a default for my list page so long as my datasource for the page is an 
EODatabaseDataSource? Are there any other gotchas?

David

 
 Paul
 On Jul 13, 2011, at 6:21 PM, Kevin wrote:
 
 I have an app that tends to lock up when a particular page is loaded. This 
 page fetches and accesses over 1500 records from a FrontBase DB. When the 
 problem happens I typically see a broken socket in the webobjects log file, 
 and if I look in the FB manager the state column shows tb swp where the 
 others show only swp. Also CPU usage is quite high when in this state. It 
 will stay this way until I kill it, or the app dies. If I kill that 
 transaction and try again, most of the time it will work fine. Sometimes I 
 have to restart the app.
 
 Any ideas how I can track this problem down. And does anyone know what the 
 letters indicate in the state field. I think there is a clue there, but I 
 can't find those letters in the docs so I don't know what they indicate.
 
 Thanks,
 Kevin ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com
 
 This email sent to p...@mac.com
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com
 
 This email sent to programming...@mac.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Occasional hang loading a particular large page

2011-07-13 Thread Kevin

On Jul 13, 2011, at 5:26 PM, Paul D Yu wrote:

 Have you tried using ERXBatchFetching stuff?
 
 I use ERXBatchingDisplayGroup for large pages and it has worked well.

No I haven't. When it works, the page loads pretty quickly, faster than I would 
have expected. If I can just track down what causes the occasional hang and fix 
that, then everyone will be happy.

- Kevin ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Occasional hang loading a particular large page

2011-07-13 Thread Kevin

On Jul 13, 2011, at 5:31 PM, Chuck Hill wrote:

 
 On 2011-07-13, at 5:21 PM, Kevin wrote:
 
 I have an app that tends to lock up when a particular page is loaded. This 
 page fetches and accesses over 1500 records from a FrontBase DB.
 
 As long as it is not a lot over 1,500 that should not cause a delay as 
 significant at this.  Turn on SQL logging and check the log.  It could be 
 that it is fetching those rows and then firing off many single row faults.  
 Or you might have a corrupt index or a unoptimizable query against a large 
 table / complex joins.
 
 
 
 When the problem happens I typically see a broken socket in the webobjects 
 log file, and if I look in the FB manager the state column shows tb swp 
 where the others show only swp.
 
 t means Open Transaction
 b means Busy
 
 So FrontBase is evaluating a query to return the result.  That suggests a 
 corrupt index or a unoptimizable query.
 
 
 Also CPU usage is quite high when in this state.
 
 App or database usage?
 
 
 It will stay this way until I kill it, or the app dies. If I kill that 
 transaction and try again, most of the time it will work fine. Sometimes I 
 have to restart the app.
 
 Any ideas how I can track this problem down. And does anyone know what the 
 letters indicate in the state field. I think there is a clue there, but I 
 can't find those letters in the docs so I don't know what they indicate.
 
 
 Check the SQL issued from the app first.  Then try the same SQL directly in 
 FB.

Thanks Chuck. I will try your suggestions and see where that leads.

- Kevin

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com