Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Can't access local web site since power outage


Go to End


6 Posts   2186 Views

Avatar
Ronin

Community Member, 50 Posts

9 March 2009 at 1:38pm

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?

Avatar
Sam

Administrator, 690 Posts

9 March 2009 at 1:47pm

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

Avatar
Ronin

Community Member, 50 Posts

9 March 2009 at 2:03pm

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

Avatar
Sam

Administrator, 690 Posts

9 March 2009 at 2:06pm

Try the following 2 things:

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

Avatar
Ronin

Community Member, 50 Posts

9 March 2009 at 2:12pm

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?

Avatar
Double-A-Ron

Community Member, 607 Posts

9 March 2009 at 3:06pm

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.