Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - An error has occurred while writing to the databas
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

An error has occurred while writing to the databas

 Post Reply Post Reply Page  123>
Author
jpullam2 View Drop Down
Groupie
Groupie


Joined: 29 September 2004
Location: Canada
Status: Offline
Points: 52
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpullam2 Quote  Post ReplyReply Direct Link To This Post Topic: An error has occurred while writing to the databas
    Posted: 28 December 2015 at 1:13pm
I just received the following error message:

Server Error in Forum Application
An error has occurred while writing to the database.
Please contact the Forum Administrator.

Support Error Code:- err_SQLServer_getSessionData()_update_last_active_date
File Name:- functions_session_data.asp
Forum Version:- 11.04

There was no further detail provided. This is a SQL Server 2008 system, newly created, which has been live for around a week now. I also saw this error message a few days ago and I restored the database from a nightly backup, which I can do again.

My concern is that this may happen regularly, especially when over the past week there have been no postings, yet it failed overnight for the second time.

Is there anything I can do to get more info on the problem? Should my hosting company have more details in the server logs to follow up on? Any suggestions?

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 29 December 2015 at 9:00am
This is a very usual error message to occur.

The error is occurring when the date/time you are last active is updated in your forum session which is stored in the database.

The last active date is updated every 3 minutes and is used to remove old stale entries from the tblSession Table in the database.

I would check to make sure that your database is not full preventing modifications to the database.

If your database is running slow for any reason then this could also be the reason for this error.

You can also change the settings for forum members sessions so they are stored in memory instead of the database. This disadvantage to this is that members sessions would reset when the app pool for your website recycles.
Back to Top
jpullam2 View Drop Down
Groupie
Groupie


Joined: 29 September 2004
Location: Canada
Status: Offline
Points: 52
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpullam2 Quote  Post ReplyReply Direct Link To This Post Posted: 29 December 2015 at 3:26pm
I will change it to put the settings in memory. Hopefully that will reduce the frequency of failing and being unable to logon.

The database is located across the country from its users and there are times when the servers may be slow or down. Does your software do an update every 3 minutes, even when there is no activity for hours? 
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 30 December 2015 at 8:56am
The update to the users session for their last activity would only occur when they move between pages and their last activity time is over 3 minutes ago.

Sessions which have a last activity time of over 20 minutes are removed.

If your database server is not located on the same network it is likely that the error is occurring due to the database update timing out. This could cause corruptions to the database if database updates are timing out.

I would advise to have the database server on the same network so that you do not get these delays which cause timeouts, but if you can not then you can increase the timeout for database connections by editing the file 'database\database_settings.asp' in a text editor and add the following to the end of SQL Server Database connection string around line 88;

Connection Timeout=90;Command Timeout=200;
Back to Top
jpullam2 View Drop Down
Groupie
Groupie


Joined: 29 September 2004
Location: Canada
Status: Offline
Points: 52
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpullam2 Quote  Post ReplyReply Direct Link To This Post Posted: 04 January 2016 at 12:32am
I just checked the forums and received this new error message:

Server Error in Forum Application
An error has occurred while writing to the database.
Please contact the Forum Administrator.

Support Error Code:- err_SQLServer_getUserData()_update_last_visit
File Name:- functions_login.asp
Forum Version:- 11.04

It appears to me that no one besides me has used the forums since the conversion. There might be someone who has looked, but over the holidays there have been no posts.

I restored the database from the nightly backup and it is again working, but obviously I can't do this every few days. 

I am no longer storing the date/time in the database, so that shouldn't be it. I can't imagine what it is trying to do ...can you help?

Is there something that I need to get the SQL administrator at my web hoster to provide?

(And by the way, the SQL data base server and the IIS web server are inside the same data centre, so I don't think that it is a problem of connectivity between the two.)
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 04 January 2016 at 8:39am
The issue sounds like a problem with the database server or the settings on your database server for the database.

If you have restricted the size of your database make sure that it has enough space assigned for the database to grow.

Also make sure that you have the database set to simple recovery mode.
Back to Top
jpullam2 View Drop Down
Groupie
Groupie


Joined: 29 September 2004
Location: Canada
Status: Offline
Points: 52
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpullam2 Quote  Post ReplyReply Direct Link To This Post Posted: 04 January 2016 at 1:42pm
The hosting tech support guy said:

We're seeing no other customers with a similar type of issue on the SQL Server that you are on. I also did a quick check of the SQL logs and didn't see anything in them regarding this database beyond the initial starting up database logs and other misc entries.

Can you tell me if there is anything we can do to intercept the underlying error the next time it occurs? Perhaps some SQL error data that can be recorded that would provide some insight into the specific condition in more technical terms?

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 04 January 2016 at 1:54pm
'Detailed Error Reporting' can be enabled from the General settings page within the forum admin area which may give more detail on why you get this error.

You also mention a conversion. What do you mean by this? Did you migrate from another database type to SQL Server or from a different forum system?
Back to Top
 Post Reply Post Reply Page  123>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.