unclecheese / silverstripe-dashboard

Dashboard module for SilverStripe 3
GNU General Public License v2.0
46 stars 35 forks source link

i installed the dash board with SS 3.4 and it made the CMS inoperable.... 30 seconds timeout #81

Open sunnysideup opened 8 years ago

sunnysideup commented 8 years ago

I put in a random die statement to see where it would crash after 100,000 loops ....

SQLSelect.php

    private static $_count_count = 0;

    /**
     * Returns the current order by as array if not already. To handle legacy
     * statements which are stored as strings. Without clauses and directions,
     * convert the orderby clause to something readable.
     *
     * @return array
     */
    public function getOrderBy() {
        self::$_count_count++;
        if(self::$_count_count > 10000) {
            user_error('ddddd');
        }

SQLSelect->getOrderBy() DataQuery.php:301 DataQuery->ensureSelectContainsOrderbyColumns(SELECT DISTINCT "SiteTree"."ClassName", "SiteTree"."LastEdited", "SiteTree"."Created", "SiteTree"."URLSegment", "SiteTree"."Title", "SiteTree"."MenuTitle", "SiteTree"."Content", "SiteTree"."MetaDescription", "SiteTree"."ExtraMeta", "SiteTree"."ShowInMenus", "SiteTree"."ShowInSearch", "SiteTree"."Sort", "SiteTree"."HasBrokenFile", "SiteTree"."HasBrokenLink", "SiteTree"."ReportClass", "SiteTree"."CanViewType", "SiteTree"."CanEditType", "SiteTree"."Priority", "SiteTree"."ShareIcons", "SiteTree"."HasSocialNetworkingLinks", "SiteTree"."AutomateMetatags", "SiteTree"."ShowMap", "SiteTree"."StaticMap", "SiteTree"."Address", "SiteTree"."ZoomLevel", "SiteTree"."InfoWindowContent", "SiteTree"."Version", "SiteTree"."ShareOnFacebookImageID", "SiteTree"."ParentID", "SiteTree"."ID", CASE WHEN "SiteTree"."ClassName" IS NOT NULL THEN "SiteTree"."ClassName" ELSE 'SiteTree' END AS "RecordClassName" FROM "SiteTree" WHERE ("SiteTree"."ParentID" = ?) ORDER BY "Sort" ASC <array ( 0 => 4879, )>) DataQuery.php:286 DataQuery->getFinalisedQuery() DataQuery.php:385 DataQuery->count() DataList.php:757 DataList->count() DataList.php:829 DataList->exists() DashboardGridFieldPanel.php:158 DashboardGridFieldPanel->getHierarchy(4879,5) DashboardGridFieldPanel.php:164 DashboardGridFieldPanel->getHierarchy(4756,4) DashboardGridFieldPanel.php:164 DashboardGridFieldPanel->getHierarchy(4549,3) DashboardGridFieldPanel.php:164 DashboardGridFieldPanel->getHierarchy(13,2) DashboardGridFieldPanel.php:164 DashboardGridFieldPanel->getHierarchy(12,1) DashboardGridFieldPanel.php:164 DashboardGridFieldPanel->getHierarchy(0) DashboardGridFieldPanel.php:129 DashboardGridFieldPanel->getConfiguration() Dashboard.php:409 Dashboard_PanelRequest->ConfigureForm() DashboardPanel.php:321 DashboardPanel->Form() ViewableData.php:446 ViewableData->obj(Form,,1,,) SSViewer.php:99 SSViewer_Scope->getObj(Form,,1,,) SSViewer.php:625 SSViewer_DataPresenter->getObj(Form,,1,,) SSViewer.php:119 SSViewer_Scope->obj(Form,,1,,) SSViewer.php:619 SSViewer_DataPresenter->obj(Form,,1) .cache.dashboardmods.templates.DashboardPanel.ss:122 include(/var/www/mysite.co.nz/silverstripe-cache/www-data/.cache.dashboardmods.templates.DashboardPanel.ss) SSViewer.php:1164 SSViewer->includeGeneratedTemplate(/var/www/mysite.co.nz/silverstripe-cache/www-data/.cache.dashboardmods.templates.DashboardPanel.ss,DashboardGridFieldPanel,,Array,) SSViewer.php:1226 SSViewer->process(DashboardGridFieldPanel,) ViewableData.php:385 ViewableData->renderWith(DashboardPanel) DashboardPanel.php:299 DashboardPanel->PanelHolder() DashboardGridFieldPanel.php:320 DashboardGridFieldPanel->PanelHolder() ViewableData.php:446 ViewableData->obj(PanelHolder,,,1) ViewableData.php:519 ViewableData->XML_val(PanelHolder,,1) call_user_func_array(Array,Array) SSViewer.php:187 SSViewer_Scope->call(XML_val,Array) SSViewer.php:650 SSViewer_DataPresenter->call(XML_val,Array) .cache.dashboardmods.templates.Dashboard_Content.ss:71 SSViewer_DataPresenter->XML_val(PanelHolder,,1) .cache.dashboardmods.templates.Dashboard_Content.ss:71 include(/var/www/mysite.co.nz/silverstripe-cache/www-data/.cache.dashboardmods.templates.Dashboard_Content.ss) SSViewer.php:1164 SSViewer->includeGeneratedTemplate(/var/www/mysite.co.nz/silverstripe-cache/www-data/.cache.dashboardmods.templates.Dashboard_Content.ss,Dashboard,,Array,) SSViewer.php:1226 SSViewer->process(Dashboard,) ViewableData.php:385 ViewableData->renderWith(Array) LeftAndMain.php:730 LeftAndMain->Content() ViewableData.php:446 ViewableData->obj(Content,,,1) ViewableData.php:519 ViewableData->XML_val(Content,,1) call_user_func_array(Array,Array) SSViewer.php:187 SSViewer_Scope->call(XML_val,Array) SSViewer.php:650 SSViewer_DataPresenter->call(XML_val,Array) .cache.framework.admin.templates.LeftAndMain.ss:41 SSViewer_DataPresenter->XML_val(Content,,1) .cache.framework.admin.templates.LeftAndMain.ss:41 include(/var/www/mysite.co.nz/silverstripe-cache/www-data/.cache.framework.admin.templates.LeftAndMain.ss) SSViewer.php:1164 SSViewer->includeGeneratedTemplate(/var/www/mysite.co.nz/silverstripe-cache/www-data/.cache.framework.admin.templates.LeftAndMain.ss,Dashboard,,Array,) SSViewer.php:1226 SSViewer->process(Dashboard,) ViewableData.php:385 ViewableData->renderWith(SSViewer) LeftAndMain.php:607 LeftAndMain->{closure}() call_user_func(Closure) PjaxResponseNegotiator.php:82 PjaxResponseNegotiator->respond(SS_HTTPRequest) LeftAndMain.php:513 LeftAndMain->index(SS_HTTPRequest) RequestHandler.php:288 RequestHandler->handleAction(SS_HTTPRequest,index) Controller.php:202 Controller->handleAction(SS_HTTPRequest,index) RequestHandler.php:200 RequestHandler->handleRequest(SS_HTTPRequest,DataModel) Controller.php:158 Controller->handleRequest(SS_HTTPRequest,DataModel) LeftAndMain.php:456 LeftAndMain->handleRequest(SS_HTTPRequest,DataModel) AdminRootController.php:92 AdminRootController->handleRequest(SS_HTTPRequest,DataModel) Director.php:385 Director::handleRequest(SS_HTTPRequest,Session,DataModel) Director.php:149 Director::direct(/admin/dashboard,DataModel) main.php:188

sunnysideup commented 8 years ago

I set up some panels and then it crashed (the site does have 5000 pages and lots of files)

sunnysideup commented 8 years ago

I deleted all DB tables and it worked again