Re: ListPage MySQL OutOfMemory
i have 50M of DB. i don't think that it can take down the instance. but i set -Xmx32m and nothing changed. i think that is not in settings. that is something fundamental. any ideas? 2012/5/4 Ramsey Gurley rgur...@smarthealth.com If you are fetching tens of thousands of rows for a list page, you may want to consider using the ERXBatchingDisplayGroup to minimize memory usage. By default, the WODisplayGroup pulls all the EOs into memory. The batching display group uses the database to handle the pagination. It only creates the EO instances for the displayed batch. If you're using a EODetailDataSource in the list page, the batching display group doesn't work AFAIK. In the case of large to-many relationships though, I would recommend you simply not model it as a relationship and handle it in code. In that case, you'd probably want to place a limit on your fetch spec to prevent all the EOs being pulled into memory. Big to-many relationships tend to cause issues when you addObjectToBothSides anyway. Ramsey On May 4, 2012, at 6:58 AM, Ron X wrote: i have small database - about 50 Mb... code: ListPageInterface listPage = D2W.factory().listPageForEntityNamed( Song.ENTITY_NAME, session()); EODataSource dataSource = new EODatabaseDataSource(session() .defaultEditingContext(), Song.ENTITY_NAME); listPage.setDataSource(dataSource); return (WOComponent) listPage; and error: N 19.07 MB used/104.87 MB free [WorkerThread8] (ERXNSLogLog4jBridge.java:43) - er.extensions.appserver.ERXComponentRequestHandler: Exception occurred while handling request: com.webobjects.foundation.NSForwardException [java.lang.OutOfMemoryError] Java heap space:java.lang.OutOfMemoryError: Java heap space [2012-5-4 6:54:11 PDT] WorkerThread8 com.webobjects.foundation.NSForwardException [java.lang.OutOfMemoryError] Java heap space:java.lang.OutOfMemoryError: Java heap space at com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:45) at com.webobjects.eocontrol.EOEditingContext.handleError(EOEditingContext.java:2971) at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4071) at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1302) at com.webobjects.eoaccess.EODatabaseDataSource.fetchObjects(EODatabaseDataSource.java:589) at com.webobjects.appserver.WODisplayGroup.fetch(WODisplayGroup.java:2132) at er.extensions.appserver.ERXDisplayGroup.fetch(ERXDisplayGroup.java:135) at er.directtoweb.pages.ERD2WListPage._fetchDisplayGroup(ERD2WListPage.java:461) at er.directtoweb.pages.ERD2WListPage.setupPhase(ERD2WListPage.java:561) at er.directtoweb.pages.ERD2WListPage.appendToResponse(ERD2WListPage.java:492) at com.webobjects.appserver.WOSession.appendToResponse(WOSession.java:1385) at er.extensions.appserver.ERXSession.appendToResponse(ERXSession.java:558) at com.webobjects.appserver.WOApplication.appendToResponse(WOApplication.java:1794) at er.extensions.appserver.ERXApplication.appendToResponse(ERXApplication.java:1994) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedPage(ERXComponentRequestHandler.java:190) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedSession(ERXComponentRequestHandler.java:235) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:268) at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302) at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:374) at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687) at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2098) at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:2063) at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144) at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.OutOfMemoryError: Java heap space at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:2145) at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1922) at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:3425) at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:481) at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3120) at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2288) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2709) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2671) at
Re: ListPage MySQL OutOfMemory
Am 10.05.2012 um 09:49 schrieb Ron X: i have 50M of DB. i don't think that it can take down the instance. but i set -Xmx32m 32MB is quite small, try with -Xms512m -Xmx1024m and see if your problem goes away and nothing changed. i think that is not in settings. that is something fundamental. any ideas? 2012/5/4 Ramsey Gurley rgur...@smarthealth.com If you are fetching tens of thousands of rows for a list page, you may want to consider using the ERXBatchingDisplayGroup to minimize memory usage. By default, the WODisplayGroup pulls all the EOs into memory. The batching display group uses the database to handle the pagination. It only creates the EO instances for the displayed batch. If you're using a EODetailDataSource in the list page, the batching display group doesn't work AFAIK. In the case of large to-many relationships though, I would recommend you simply not model it as a relationship and handle it in code. In that case, you'd probably want to place a limit on your fetch spec to prevent all the EOs being pulled into memory. Big to-many relationships tend to cause issues when you addObjectToBothSides anyway. Ramsey On May 4, 2012, at 6:58 AM, Ron X wrote: i have small database - about 50 Mb... code: ListPageInterface listPage = D2W.factory().listPageForEntityNamed( Song.ENTITY_NAME, session()); EODataSource dataSource = new EODatabaseDataSource(session() .defaultEditingContext(), Song.ENTITY_NAME); listPage.setDataSource(dataSource); return (WOComponent) listPage; and error: N 19.07 MB used/104.87 MB free [WorkerThread8] (ERXNSLogLog4jBridge.java:43) - er.extensions.appserver.ERXComponentRequestHandler: Exception occurred while handling request: com.webobjects.foundation.NSForwardException [java.lang.OutOfMemoryError] Java heap space:java.lang.OutOfMemoryError: Java heap space [2012-5-4 6:54:11 PDT] WorkerThread8 com.webobjects.foundation.NSForwardException [java.lang.OutOfMemoryError] Java heap space:java.lang.OutOfMemoryError: Java heap space at com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:45) at com.webobjects.eocontrol.EOEditingContext.handleError(EOEditingContext.java:2971) at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4071) at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1302) at com.webobjects.eoaccess.EODatabaseDataSource.fetchObjects(EODatabaseDataSource.java:589) at com.webobjects.appserver.WODisplayGroup.fetch(WODisplayGroup.java:2132) at er.extensions.appserver.ERXDisplayGroup.fetch(ERXDisplayGroup.java:135) at er.directtoweb.pages.ERD2WListPage._fetchDisplayGroup(ERD2WListPage.java:461) at er.directtoweb.pages.ERD2WListPage.setupPhase(ERD2WListPage.java:561) at er.directtoweb.pages.ERD2WListPage.appendToResponse(ERD2WListPage.java:492) at com.webobjects.appserver.WOSession.appendToResponse(WOSession.java:1385) at er.extensions.appserver.ERXSession.appendToResponse(ERXSession.java:558) at com.webobjects.appserver.WOApplication.appendToResponse(WOApplication.java:1794) at er.extensions.appserver.ERXApplication.appendToResponse(ERXApplication.java:1994) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedPage(ERXComponentRequestHandler.java:190) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedSession(ERXComponentRequestHandler.java:235) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:268) at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302) at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:374) at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687) at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2098) at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:2063) at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144) at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.OutOfMemoryError: Java heap space at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:2145) at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1922) at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:3425) at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:481) at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3120) at
Re: ListPage MySQL OutOfMemory
ESs-Mac:~ user$ top 5340 java 94.2 01:40.99 42/1 1370 393 487M+ 9124K 525M+ RuntimeException: Statement running too long at er.extensions.eof.ERXEOAccessUtilities.logExpression(ERXEOAccessUtilities.java:1213) at er.extensions.eof.ERXAdaptorChannelDelegate.adaptorChannelDidEvaluateExpression(ERXAdaptorChannelDelegate.java:81) ... skipped 5 stack elements at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223) at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:163) ... skipped 6 stack elements at er.extensions.eof.ERXDatabaseContext._objectsWithFetchSpecificationEditingContext(ERXDatabaseContext.java:66) ... skipped 1 stack elements at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488) at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069) at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1302) ... skipped 1 stack elements at com.legalsounds.MainNavigationController.mostDownloadedAction(MainNavigationController.java:77) ... skipped 15 stack elements at er.extensions.appserver.navigation.ERXNavigationMenuItem.menuItemSelected(ERXNavigationMenuItem.java:137) ... skipped 64 stack elements at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedPage(ERXComponentRequestHandler.java:157) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedSession(ERXComponentRequestHandler.java:235) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:268) at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302) at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:374) ... skipped 6 stack elements 2012/5/10 Johann Werner j...@oyosys.de -Xms512m -Xmx1024m ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ListPage MySQL OutOfMemory
Your fetch is taking too long. What is the SQL that is sent to your db? How big is the resultset you are expecting? Perhaps your indexes are broken (you have indexes, don't you)? jw Am 10.05.2012 um 10:37 schrieb Ron X: ESs-Mac:~ user$ top 5340 java 94.2 01:40.99 42/1 1370 393 487M+ 9124K 525M+ RuntimeException: Statement running too long at er.extensions.eof.ERXEOAccessUtilities.logExpression(ERXEOAccessUtilities.java:1213) at er.extensions.eof.ERXAdaptorChannelDelegate.adaptorChannelDidEvaluateExpression(ERXAdaptorChannelDelegate.java:81) ... skipped 5 stack elements at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223) at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:163) ... skipped 6 stack elements at er.extensions.eof.ERXDatabaseContext._objectsWithFetchSpecificationEditingContext(ERXDatabaseContext.java:66) ... skipped 1 stack elements at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488) at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069) at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1302) ... skipped 1 stack elements at com.legalsounds.MainNavigationController.mostDownloadedAction(MainNavigationController.java:77) ... skipped 15 stack elements at er.extensions.appserver.navigation.ERXNavigationMenuItem.menuItemSelected(ERXNavigationMenuItem.java:137) ... skipped 64 stack elements at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedPage(ERXComponentRequestHandler.java:157) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedSession(ERXComponentRequestHandler.java:235) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:268) at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302) at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:374) ... skipped 6 stack elements 2012/5/10 Johann Werner j...@oyosys.de -Xms512m -Xmx1024m ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ListPage MySQL OutOfMemory
i use Navicat to see the DB so select * from Song was 0.8 sec. but in code the same query: ERROR 150.87 MB used/359.07 MB free [WorkerThread2] (ERXEOAccessUtilities.java:1213) Page: er.modern.look.pages.ERMODQueryEntitiesPage - Configuration: null - Song@116895853 expression took 16567 ms: 2012/5/10 Johann Werner j...@oyosys.de Your fetch is taking too long. What is the SQL that is sent to your db? How big is the resultset you are expecting? Perhaps your indexes are broken (you have indexes, don't you)? jw Am 10.05.2012 um 10:37 schrieb Ron X: ESs-Mac:~ user$ top 5340 java 94.2 01:40.99 42/1 1370 393 487M+ 9124K 525M+ RuntimeException: Statement running too long at er.extensions.eof.ERXEOAccessUtilities.logExpression(ERXEOAccessUtilities.java:1213) at er.extensions.eof.ERXAdaptorChannelDelegate.adaptorChannelDidEvaluateExpression(ERXAdaptorChannelDelegate.java:81) ... skipped 5 stack elements at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223) at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:163) ... skipped 6 stack elements at er.extensions.eof.ERXDatabaseContext._objectsWithFetchSpecificationEditingContext(ERXDatabaseContext.java:66) ... skipped 1 stack elements at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488) at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069) at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1302) ... skipped 1 stack elements at com.legalsounds.MainNavigationController.mostDownloadedAction(MainNavigationController.java:77) ... skipped 15 stack elements at er.extensions.appserver.navigation.ERXNavigationMenuItem.menuItemSelected(ERXNavigationMenuItem.java:137) ... skipped 64 stack elements at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedPage(ERXComponentRequestHandler.java:157) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedSession(ERXComponentRequestHandler.java:235) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:268) at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302) at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:374) ... skipped 6 stack elements 2012/5/10 Johann Werner j...@oyosys.de -Xms512m -Xmx1024m ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ListPage MySQL OutOfMemory
that was in debug mode. in run-mode: WARN 422.22 MB used/87.72 MB free [WorkerThread3] (ERXNSLogLog4jBridge.java:43) (ListSong) - er.extensions.appserver.ERXComponentRequestHandler: Exception occurred while handling request: java.lang.ClassCastException: java.lang.String cannot be cast to er.directtoweb.delegates.ERDBranchDelegateInterface ERROR 426.75 MB used/83.18 MB free [WorkerThread3] (ERXApplication.java:1786) (ListSong) - Exception caught: java.lang.String cannot be cast to er.directtoweb.delegates.ERDBranchDelegateInterface ClassCastException: java.lang.String cannot be cast to er.directtoweb.delegates.ERDBranchDelegateInterface at er.directtoweb.pages.ERD2WPage.pageController(ERD2WPage.java:1173) at er.directtoweb.components.buttons.ERDControllerButton.branchDelegate(ERDControllerButton.java:64) at er.directtoweb.components.buttons.ERDControllerButton.branchChoices(ERDControllerButton.java:136) ... skipped 94 stack elements at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedPage(ERXComponentRequestHandler.java:190) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedSession(ERXComponentRequestHandler.java:235) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:268) at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302) at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:374) ... skipped 6 stack elements _ignoredPackages:: ( ) 2012/5/10 Ron X ron.x.by...@gmail.com i use Navicat to see the DB so select * from Song was 0.8 sec. but in code the same query: ERROR 150.87 MB used/359.07 MB free [WorkerThread2] (ERXEOAccessUtilities.java:1213) Page: er.modern.look.pages.ERMODQueryEntitiesPage - Configuration: null - Song@116895853 expression took 16567 ms: 2012/5/10 Johann Werner j...@oyosys.de Your fetch is taking too long. What is the SQL that is sent to your db? How big is the resultset you are expecting? Perhaps your indexes are broken (you have indexes, don't you)? jw Am 10.05.2012 um 10:37 schrieb Ron X: ESs-Mac:~ user$ top 5340 java 94.2 01:40.99 42/1 1370 393 487M+ 9124K 525M+ RuntimeException: Statement running too long at er.extensions.eof.ERXEOAccessUtilities.logExpression(ERXEOAccessUtilities.java:1213) at er.extensions.eof.ERXAdaptorChannelDelegate.adaptorChannelDidEvaluateExpression(ERXAdaptorChannelDelegate.java:81) ... skipped 5 stack elements at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223) at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:163) ... skipped 6 stack elements at er.extensions.eof.ERXDatabaseContext._objectsWithFetchSpecificationEditingContext(ERXDatabaseContext.java:66) ... skipped 1 stack elements at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488) at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069) at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1302) ... skipped 1 stack elements at com.legalsounds.MainNavigationController.mostDownloadedAction(MainNavigationController.java:77) ... skipped 15 stack elements at er.extensions.appserver.navigation.ERXNavigationMenuItem.menuItemSelected(ERXNavigationMenuItem.java:137) ... skipped 64 stack elements at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedPage(ERXComponentRequestHandler.java:157) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedSession(ERXComponentRequestHandler.java:235) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:268) at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302) at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:374) ... skipped 6 stack elements 2012/5/10 Johann Werner j...@oyosys.de -Xms512m -Xmx1024m ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ListPage MySQL OutOfMemory
Am 10.05.2012 um 10:44 schrieb Ron X: i use Navicat to see the DB so select * from Song was 0.8 sec. but in code the same query: ERROR 150.87 MB used/359.07 MB free [WorkerThread2] (ERXEOAccessUtilities.java:1213) Page: er.modern.look.pages.ERMODQueryEntitiesPage - Configuration: null - Song@116895853 expression took 16567 ms: If the fetch takes nearly 17s instead of 0.8s there must be something wrong (or at least different). What is the exact SQL that is sent to the db, you should look at that, perhaps something in your model is wrong? 2012/5/10 Johann Werner j...@oyosys.de Your fetch is taking too long. What is the SQL that is sent to your db? How big is the resultset you are expecting? Perhaps your indexes are broken (you have indexes, don't you)? jw Am 10.05.2012 um 10:37 schrieb Ron X: ESs-Mac:~ user$ top 5340 java 94.2 01:40.99 42/1 1370 393 487M+ 9124K 525M+ RuntimeException: Statement running too long at er.extensions.eof.ERXEOAccessUtilities.logExpression(ERXEOAccessUtilities.java:1213) at er.extensions.eof.ERXAdaptorChannelDelegate.adaptorChannelDidEvaluateExpression(ERXAdaptorChannelDelegate.java:81) ... skipped 5 stack elements at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223) at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:163) ... skipped 6 stack elements at er.extensions.eof.ERXDatabaseContext._objectsWithFetchSpecificationEditingContext(ERXDatabaseContext.java:66) ... skipped 1 stack elements at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488) at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069) at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1302) ... skipped 1 stack elements at com.legalsounds.MainNavigationController.mostDownloadedAction(MainNavigationController.java:77) ... skipped 15 stack elements at er.extensions.appserver.navigation.ERXNavigationMenuItem.menuItemSelected(ERXNavigationMenuItem.java:137) ... skipped 64 stack elements at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedPage(ERXComponentRequestHandler.java:157) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedSession(ERXComponentRequestHandler.java:235) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:268) at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302) at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:374) ... skipped 6 stack elements 2012/5/10 Johann Werner j...@oyosys.de -Xms512m -Xmx1024m ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ListPage MySQL OutOfMemory
Ron: Johann's suggestion was the best course of action. Review the SQL that the app is producing for the request in question. Post back to the list all of the exact queries this single request is executing. Tim On May 10, 2012, at 2:22 AM, Ron X ron.x.by...@gmail.com wrote: maybe i have troubles with rules? 2012/5/10 Johann Werner j...@oyosys.de Am 10.05.2012 um 10:44 schrieb Ron X: i use Navicat to see the DB so select * from Song was 0.8 sec. but in code the same query: ERROR 150.87 MB used/359.07 MB free [WorkerThread2] (ERXEOAccessUtilities.java:1213) Page: er.modern.look.pages.ERMODQueryEntitiesPage - Configuration: null - Song@116895853 expression took 16567 ms: If the fetch takes nearly 17s instead of 0.8s there must be something wrong (or at least different). What is the exact SQL that is sent to the db, you should look at that, perhaps something in your model is wrong? 2012/5/10 Johann Werner j...@oyosys.de Your fetch is taking too long. What is the SQL that is sent to your db? How big is the resultset you are expecting? Perhaps your indexes are broken (you have indexes, don't you)? jw Am 10.05.2012 um 10:37 schrieb Ron X: ESs-Mac:~ user$ top 5340 java 94.2 01:40.99 42/1 1370 393 487M+ 9124K 525M+ RuntimeException: Statement running too long at er.extensions.eof.ERXEOAccessUtilities.logExpression(ERXEOAccessUtilities.java:1213) at er.extensions.eof.ERXAdaptorChannelDelegate.adaptorChannelDidEvaluateExpression(ERXAdaptorChannelDelegate.java:81) ... skipped 5 stack elements at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223) at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:163) ... skipped 6 stack elements at er.extensions.eof.ERXDatabaseContext._objectsWithFetchSpecificationEditingContext(ERXDatabaseContext.java:66) ... skipped 1 stack elements at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488) at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069) at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1302) ... skipped 1 stack elements at com.legalsounds.MainNavigationController.mostDownloadedAction(MainNavigationController.java:77) ... skipped 15 stack elements at er.extensions.appserver.navigation.ERXNavigationMenuItem.menuItemSelected(ERXNavigationMenuItem.java:137) ... skipped 64 stack elements at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedPage(ERXComponentRequestHandler.java:157) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedSession(ERXComponentRequestHandler.java:235) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:268) at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302) at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:374) ... skipped 6 stack elements 2012/5/10 Johann Werner j...@oyosys.de -Xms512m -Xmx1024m rule.png ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/lists%40thetimmy.com This email sent to li...@thetimmy.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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ListPage MySQL OutOfMemory
Looks like you're using the wrong assignment class and assigning a pageController as a string instead of an instance of a branch delegate. On May 10, 2012, at 1:55 AM, Ron X wrote: that was in debug mode. in run-mode: WARN 422.22 MB used/87.72 MB free [WorkerThread3] (ERXNSLogLog4jBridge.java:43) (ListSong) - er.extensions.appserver.ERXComponentRequestHandler: Exception occurred while handling request: java.lang.ClassCastException: java.lang.String cannot be cast to er.directtoweb.delegates.ERDBranchDelegateInterface ERROR 426.75 MB used/83.18 MB free [WorkerThread3] (ERXApplication.java:1786) (ListSong) - Exception caught: java.lang.String cannot be cast to er.directtoweb.delegates.ERDBranchDelegateInterface ClassCastException: java.lang.String cannot be cast to er.directtoweb.delegates.ERDBranchDelegateInterface at er.directtoweb.pages.ERD2WPage.pageController(ERD2WPage.java:1173) at er.directtoweb.components.buttons.ERDControllerButton.branchDelegate(ERDControllerButton.java:64) at er.directtoweb.components.buttons.ERDControllerButton.branchChoices(ERDControllerButton.java:136) ... skipped 94 stack elements at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedPage(ERXComponentRequestHandler.java:190) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedSession(ERXComponentRequestHandler.java:235) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:268) at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302) at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:374) ... skipped 6 stack elements _ignoredPackages:: ( ) 2012/5/10 Ron X ron.x.by...@gmail.com i use Navicat to see the DB so select * from Song was 0.8 sec. but in code the same query: ERROR 150.87 MB used/359.07 MB free [WorkerThread2] (ERXEOAccessUtilities.java:1213) Page: er.modern.look.pages.ERMODQueryEntitiesPage - Configuration: null - Song@116895853 expression took 16567 ms: 2012/5/10 Johann Werner j...@oyosys.de Your fetch is taking too long. What is the SQL that is sent to your db? How big is the resultset you are expecting? Perhaps your indexes are broken (you have indexes, don't you)? jw Am 10.05.2012 um 10:37 schrieb Ron X: ESs-Mac:~ user$ top 5340 java 94.2 01:40.99 42/1 1370 393 487M+ 9124K 525M+ RuntimeException: Statement running too long at er.extensions.eof.ERXEOAccessUtilities.logExpression(ERXEOAccessUtilities.java:1213) at er.extensions.eof.ERXAdaptorChannelDelegate.adaptorChannelDidEvaluateExpression(ERXAdaptorChannelDelegate.java:81) ... skipped 5 stack elements at com.webobjects.foundation._NSDelegate._perform(_NSDelegate.java:223) at com.webobjects.foundation._NSDelegate.perform(_NSDelegate.java:163) ... skipped 6 stack elements at er.extensions.eof.ERXDatabaseContext._objectsWithFetchSpecificationEditingContext(ERXDatabaseContext.java:66) ... skipped 1 stack elements at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488) at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069) at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1302) ... skipped 1 stack elements at com.legalsounds.MainNavigationController.mostDownloadedAction(MainNavigationController.java:77) ... skipped 15 stack elements at er.extensions.appserver.navigation.ERXNavigationMenuItem.menuItemSelected(ERXNavigationMenuItem.java:137) ... skipped 64 stack elements at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedPage(ERXComponentRequestHandler.java:157) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedSession(ERXComponentRequestHandler.java:235) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:268) at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302) at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:374) ... skipped 6 stack elements 2012/5/10 Johann Werner j...@oyosys.de -Xms512m -Xmx1024m ___ 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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: ListPage MySQL OutOfMemory
What VM arguments are you using for: -XX:MaxPermSize=??? -Xmsm -Xmxm On May 4, 2012, at 9:58 AM, Ron X wrote: i have small database - about 50 Mb... code: ListPageInterface listPage = D2W.factory().listPageForEntityNamed( Song.ENTITY_NAME, session()); EODataSource dataSource = new EODatabaseDataSource(session() .defaultEditingContext(), Song.ENTITY_NAME); listPage.setDataSource(dataSource); return (WOComponent) listPage; and error: N 19.07 MB used/104.87 MB free [WorkerThread8] (ERXNSLogLog4jBridge.java:43) - er.extensions.appserver.ERXComponentRequestHandler: Exception occurred while handling request: com.webobjects.foundation.NSForwardException [java.lang.OutOfMemoryError] Java heap space:java.lang.OutOfMemoryError: Java heap space [2012-5-4 6:54:11 PDT] WorkerThread8 com.webobjects.foundation.NSForwardException [java.lang.OutOfMemoryError] Java heap space:java.lang.OutOfMemoryError: Java heap space at com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:45) at com.webobjects.eocontrol.EOEditingContext.handleError(EOEditingContext.java:2971) at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4071) at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1302) at com.webobjects.eoaccess.EODatabaseDataSource.fetchObjects(EODatabaseDataSource.java:589) at com.webobjects.appserver.WODisplayGroup.fetch(WODisplayGroup.java:2132) at er.extensions.appserver.ERXDisplayGroup.fetch(ERXDisplayGroup.java:135) at er.directtoweb.pages.ERD2WListPage._fetchDisplayGroup(ERD2WListPage.java:461) at er.directtoweb.pages.ERD2WListPage.setupPhase(ERD2WListPage.java:561) at er.directtoweb.pages.ERD2WListPage.appendToResponse(ERD2WListPage.java:492) at com.webobjects.appserver.WOSession.appendToResponse(WOSession.java:1385) at er.extensions.appserver.ERXSession.appendToResponse(ERXSession.java:558) at com.webobjects.appserver.WOApplication.appendToResponse(WOApplication.java:1794) at er.extensions.appserver.ERXApplication.appendToResponse(ERXApplication.java:1994) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedPage(ERXComponentRequestHandler.java:190) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedSession(ERXComponentRequestHandler.java:235) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:268) at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302) at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:374) at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687) at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2098) at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:2063) at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144) at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.OutOfMemoryError: Java heap space at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:2145) at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1922) at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:3425) at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:481) at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3120) at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2288) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2709) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2671) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2621) at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:842) at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:681) at com.webobjects.jdbcadaptor.JDBCChannel._bindInputVariablesWithBindingsAndExecute(JDBCChannel.java:272) at com.webobjects.jdbcadaptor.JDBCChannel._evaluateExpression(JDBCChannel.java:337) at com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression(JDBCChannel.java:296) at com.webobjects.jdbcadaptor.JDBCChannel.selectAttributes(JDBCChannel.java:220) at com.webobjects.eoaccess.EODatabaseChannel._selectWithFetchSpecificationEditingContext(EODatabaseChannel.java:897) at com.webobjects.eoaccess.EODatabaseChannel.selectObjectsWithFetchSpecification(EODatabaseChannel.java:234) at com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:3055) at
Re: ListPage MySQL OutOfMemory
If you are fetching tens of thousands of rows for a list page, you may want to consider using the ERXBatchingDisplayGroup to minimize memory usage. By default, the WODisplayGroup pulls all the EOs into memory. The batching display group uses the database to handle the pagination. It only creates the EO instances for the displayed batch. If you're using a EODetailDataSource in the list page, the batching display group doesn't work AFAIK. In the case of large to-many relationships though, I would recommend you simply not model it as a relationship and handle it in code. In that case, you'd probably want to place a limit on your fetch spec to prevent all the EOs being pulled into memory. Big to-many relationships tend to cause issues when you addObjectToBothSides anyway. Ramsey On May 4, 2012, at 6:58 AM, Ron X wrote: i have small database - about 50 Mb... code: ListPageInterface listPage = D2W.factory().listPageForEntityNamed( Song.ENTITY_NAME, session()); EODataSource dataSource = new EODatabaseDataSource(session() .defaultEditingContext(), Song.ENTITY_NAME); listPage.setDataSource(dataSource); return (WOComponent) listPage; and error: N 19.07 MB used/104.87 MB free [WorkerThread8] (ERXNSLogLog4jBridge.java:43) - er.extensions.appserver.ERXComponentRequestHandler: Exception occurred while handling request: com.webobjects.foundation.NSForwardException [java.lang.OutOfMemoryError] Java heap space:java.lang.OutOfMemoryError: Java heap space [2012-5-4 6:54:11 PDT] WorkerThread8 com.webobjects.foundation.NSForwardException [java.lang.OutOfMemoryError] Java heap space:java.lang.OutOfMemoryError: Java heap space at com.webobjects.foundation.NSForwardException._runtimeExceptionForThrowable(NSForwardException.java:45) at com.webobjects.eocontrol.EOEditingContext.handleError(EOEditingContext.java:2971) at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4071) at er.extensions.eof.ERXEC.objectsWithFetchSpecification(ERXEC.java:1302) at com.webobjects.eoaccess.EODatabaseDataSource.fetchObjects(EODatabaseDataSource.java:589) at com.webobjects.appserver.WODisplayGroup.fetch(WODisplayGroup.java:2132) at er.extensions.appserver.ERXDisplayGroup.fetch(ERXDisplayGroup.java:135) at er.directtoweb.pages.ERD2WListPage._fetchDisplayGroup(ERD2WListPage.java:461) at er.directtoweb.pages.ERD2WListPage.setupPhase(ERD2WListPage.java:561) at er.directtoweb.pages.ERD2WListPage.appendToResponse(ERD2WListPage.java:492) at com.webobjects.appserver.WOSession.appendToResponse(WOSession.java:1385) at er.extensions.appserver.ERXSession.appendToResponse(ERXSession.java:558) at com.webobjects.appserver.WOApplication.appendToResponse(WOApplication.java:1794) at er.extensions.appserver.ERXApplication.appendToResponse(ERXApplication.java:1994) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedPage(ERXComponentRequestHandler.java:190) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedSession(ERXComponentRequestHandler.java:235) at er.extensions.appserver.ERXComponentRequestHandler._dispatchWithPreparedApplication(ERXComponentRequestHandler.java:268) at er.extensions.appserver.ERXComponentRequestHandler._handleRequest(ERXComponentRequestHandler.java:302) at er.extensions.appserver.ERXComponentRequestHandler.handleRequest(ERXComponentRequestHandler.java:374) at com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687) at er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:2098) at er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:2063) at com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144) at com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.OutOfMemoryError: Java heap space at com.mysql.jdbc.MysqlIO.nextRowFast(MysqlIO.java:2145) at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1922) at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:3425) at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:481) at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3120) at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2288) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2709) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2671) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2621) at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:842) at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:681) at