Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-04-2012, 04:26 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
"attempt to write a readonly database"

I just repurchased my playerworld after it had been offline for a few weeks, and now RC is spammed with the error "attempt to write a readonly database" whenever I try to work with the SQLite Database.

Help please!
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #2  
Old 02-04-2012, 05:54 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
I also can't seem to download main.db from file browser.

PHP Code:
Welcome to the FileBrowser for account_xXziroXx
No read rights 
for main.db
Download of main
.db failed 
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #3  
Old 02-04-2012, 09:47 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
If you change the database definitions in server ops are you able to use a different database file?

e.g. add database=default,main-new
__________________
Reply With Quote
  #4  
Old 02-04-2012, 10:31 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by cbk1994 View Post
If you change the database definitions in server ops are you able to use a different database file?
Yes, I can manipulate other databases, just not the default one (where the vast majority of my data is).
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #5  
Old 02-06-2012, 09:55 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Bump. Come on Stefan, two days of browsing the forum and no help? This is pretty important
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #6  
Old 02-09-2012, 04:26 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Sorry for not answering earlier.
The file wasn't writable by the npcserver because of missing rights. It must have been caused by the fact that I was restoring it from a backup sometime in December, it wasn't writable back then either though? Anyway it should work better now. It's still quite huge (123 MByte) so it might be good to clean some stuff or put data in separate databases to avoid problems like back then when the file was corrupted.
Reply With Quote
  #7  
Old 02-09-2012, 04:45 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Might it be possible for there to be a way to clean up databases where there is excess file size by result of previous data that has been deleted?

Something I've done before with 0 players online + staff only is temporarily set default database to a different name in server options, clean up main.db offline with SQlite browser software, reupload main.db and set it back to default in server options.
Reply With Quote
  #8  
Old 02-09-2012, 01:47 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Hmmm tried the "vacuum" command? (make a backup first) I've heard it should help but have never tried.
Reply With Quote
  #9  
Old 02-12-2012, 11:15 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by Stefan View Post
Hmmm tried the "vacuum" command? (make a backup first) I've heard it should help but have never tried.
It's not a problem as my database is only 1.5 MB, but I tried this anyway and received this error:

Quote:
too many attached databases - max 0
On a related note, at various times over the past week there's been some very abnormal serverside lag, where a Database NPC would be listed as 5 - 10% in RC /stats, which seems to be caused by SQLite queries immediately following eachother.

An example of an executed query happening in these instances:

PHP Code:
temp.query "UPDATE tablename SET examplevalue = examplevalue + " float(temp.amtstring) @ " WHERE examplevalue2 = '" temp.item.escape() @ "'"
What's surprising is that this simple query is affecting a table which contains only 2 rows, 4 columns, with the necessary value being indexed. I have other SQLite tables with thousands of entries where queries are executing quickly and not causing bizarre lag spikes.
Reply With Quote
  #10  
Old 02-12-2012, 07:52 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by ffcmike View Post
On a related note, at various times over the past week there's been some very abnormal serverside lag, where a Database NPC would be listed as 5 - 10% in RC /stats, which seems to be caused by SQLite queries immediately following eachother.
From experience I don't think this is caused by the SQL but rather by the server locking up (backups? other servers using too much memory?). On Era we often see scripts hit 10+% CPU when the server is lagging, even if the scripts aren't doing anything that should cause problems (e.g. doing damage to a player by changing their HP; no SQL or file I/O involved). Scripts using SQLite often are at the top of the CPU list at this time, but not always.

I'd like to see Stefan look into this and find the real problem, though. It's been around for years and affects big servers like Era and even small UC servers I've worked on with few scripts and one or two players online.
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.