Jump to:

23578 Posts in 19403 Topics by 2893 members

General Questions

SilverStripe Forums » General Questions » Can't access local web site since power outage

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1336 Views
  • Ronin
    Avatar
    Community Member
    50 Posts

    Can't access local web site since power outage Link to this post

    I had an unexpected power down and since then I have not been able to get to my local development site which is on my machine.
    HTTP 500 Internal Server Error comes up when I try to go to the site. Since the error occurred the machine has been restarted but this made no difference.
    I have a second copy of SS installed which I used for doing the tutorials in and this still works fine. It does access a different a different database.

    I was in the middle of working on the site when the power went down.

    I have checked the Apache error log and the entry is listed below.

    This is the extract from the error log when I try to access the site.

    [Fri Mar 06 10:02:05 2009] [warn] pid file C:/wamp/bin/apache/apache2.2.8/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
    [Fri Mar 06 10:02:05 2009] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming normal operations
    [Fri Mar 06 10:02:05 2009] [notice] Server built: Jan 18 2008 00:37:19
    [Fri Mar 06 10:02:05 2009] [notice] Parent: Created child process 5824
    [Fri Mar 06 10:02:05 2009] [notice] Child 5824: Child process is running
    [Fri Mar 06 10:02:05 2009] [notice] Child 5824: Acquired the start mutex.
    [Fri Mar 06 10:02:05 2009] [notice] Child 5824: Starting 64 worker threads.
    [Fri Mar 06 10:02:05 2009] [notice] Child 5824: Starting thread to listen on port 3000.

    Can anyone suggest what I should try?

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Can't access local web site since power outage Link to this post

    Pleaseput your site into dev mode to get a more useful error message - http://doc.silverstripe.com/doku.php?id=debugging

  • Ronin
    Avatar
    Community Member
    50 Posts

    Re: Can't access local web site since power outage Link to this post

    Have put the system into Dev mode and got the following error messages

    FATAL ERROR: DATABASE ERROR: Couldn't run query: INSERT INTO `PageView` SET Created = NOW() | Duplicate entry '1232' for key 1
    At line 431 in C:\wamp\www\silverstripe3\sapphire\core\model\Database.php

    user_error(DATABASE ERROR: Couldn't run query: INSERT INTO `PageView` SET Created = NOW() | Duplicate entry '1232' for key 1,256)
    line 431 of Database.php

    Database->databaseError(Couldn't run query: INSERT INTO `PageView` SET Created = NOW() | Duplicate entry '1232' for key 1,256)
    line 108 of MySQLDatabase.php

    MySQLDatabase->query(INSERT INTO `PageView` SET Created = NOW(),256)
    line 81 of DB.php

    DB::query(INSERT INTO `PageView` SET Created = NOW())
    line 557 of DataObject.php

    DataObject->write(1)
    line 66 of PageView.php

    PageView->record()
    line 185 of Statistics.php

    Statistics::collect()
    line 84 of ContentController.php

    ContentController->init()
    line 17 of Page.php

    Page_Controller->init()
    line 126 of Controller.php

    Controller->run(Array)
    line 22 of ModelAsController.php

    ModelAsController->run(Array)
    line 104 of Director.php

    Director::direct(/home)
    line 158 of main.php

    Context

    --------------------------------------------------------------------------------

    Debug (Debug::showError() in line 180 of Debug.php)
    msg =
    Couldn't run query: INSERT INTO `PageView` SET Created = NOW() | Duplicate entry '1232' for key 1
    errorLevel =
    256

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Can't access local web site since power outage Link to this post

    Try the following 2 things:

    * Visit db/build?flush=1
    * Drop the PageView table in your database, and then visit db/build?flush=1

  • Ronin
    Avatar
    Community Member
    50 Posts

    Re: Can't access local web site since power outage Link to this post

    Thanks for that Sam. Running db/build?flush=1 repaired the table and and I am now able to access the site. I am a bit confused though. I did try db/build?flush=1 a number of times since this error occured and each time simply got the HTTP 500 error message. The only thing that I can see that is different this time round is that I am in Dev mode.
    Would this make a difference?

  • Double-A-Ron
    Avatar
    Community Member
    604 Posts

    Re: Can't access local web site since power outage Link to this post

    More likely you just had the 500 error page stuck in your browser cache. I usually have to refesh a db/build/flush=1 once more, especially when using firefox.

    1336 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.