Database in memory

Results 1 to 11 of 11
  1. #1
    Proficient Member michae5k is offline
    MemberRank
    Jan 2009 Join Date
    LondonLocation
    177Posts

    Database in memory

    Hi, i am helping someone out with a server and there appears to have been an odd issue. Basically the game database (such as the auction and city files) within the relevant dbdata directory seem to have been deleted whilst the server is still live.

    How this happened, i am not too sure (will look into after) but due to this, the persistent data is now only located within the system memory of the server and not within the flat files.

    If possible, does anyone know a solution to "dump" the live character information back into the flat files ? as the server is cannot be restarted until such time as all character data would be wiped.

    p.s i have looked into the gamedbd executable, however this only seems to correspond to the flat files, so currently is of no help.


    Thanks for any help offered :)


  2. #2
    The One And Only DaMadBoy is offline
    MemberRank
    Jun 2009 Join Date
    Behind You!Location
    545Posts

    Re: Database in memory

    From what I know any data that is currently in the memory will automatically get written into these files after 15 mins.

  3. #3
    Proficient Member michae5k is offline
    MemberRank
    Jan 2009 Join Date
    LondonLocation
    177Posts

    Re: Database in memory

    That's what i thought, unfortunately it does not recreate the files, so i used the default files...which after 24hrs...still have not been overwritten with data :(

  4. #4
    PW Dev <3 Ozuru is offline
    MemberRank
    Feb 2011 Join Date
    737Posts

    Re: Database in memory

    I had this problem, and to fix it I:

    -Added more ram
    -Added more space on the disk

    and somehow it sorted itself out.

    BUT:

    If you use a vbox for your pwserver, take lots of snapshots. Sometimes it helps to just take snapshots, that way not EVERYTHING is lost.

    Just try making a new vbox server, and then hope for the best.

    As I said before though, give it more of something.

  5. #5
    Proficient Member michae5k is offline
    MemberRank
    Jan 2009 Join Date
    LondonLocation
    177Posts

    Re: Database in memory

    Quote Originally Posted by M a g i c View Post
    I had this problem, and to fix it I:

    -Added more ram
    -Added more space on the disk

    and somehow it sorted itself out.

    BUT:

    If you use a vbox for your pwserver, take lots of snapshots. Sometimes it helps to just take snapshots, that way not EVERYTHING is lost.

    Just try making a new vbox server, and then hope for the best.

    As I said before though, give it more of something.
    Thanks for the reply, however i have been developing for PW since 2009 so im not what i would consider a noob lol :P
    Plus the server is operating with the following hardware:
    -16GB Ram.
    -Intel i5 quad-core 2.80GHz 2300k (think that's it lol).
    -1Gbit Lan.
    -2TB HDD.
    -16gb Swap.


    Its nothing related to hardware or ram other than the fact the database is currently stored on the system memory (quite afew online games use flat files for persistences whilst loading into ram at server start up such is that of PW)

    The issue is that those "flat files" are no longer existant, thus as soon as the server is restarted...all data will be lost. the solution would be to create a "dump" of the database currently held within the memory and load it back into it's flat file form.

    Has anyone a solution for this ?
    Last edited by michae5k; 10-11-11 at 11:56 PM.

  6. #6
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: Database in memory

    Quote Originally Posted by michae5k View Post
    Thanks for the reply, however i have been developing for PW since 2009 so im not what i would consider a noob lol :P
    Plus the server is operating with the following hardware:
    -16GB Ram.
    -Intel i5 quad-core 2.80GHz 2300k (think that's it lol).
    -1Gbit Lan.
    -2TB HDD.
    -16gb Swap.


    Its nothing related to hardware or ram other than the fact the database is currently stored on the system memory (quite afew online games use flat files for persistences whilst loading into ram at server start up such is that of PW)

    The issue is that those "flat files" are no longer existant, thus as soon as the server is restarted...all data will be lost. the solution would be to create a "dump" of the database currently held within the memory and load it back into it's flat file form.

    Has anyone a solution for this ?
    Well technically... you could dump any programs RAM to disk... and be able to start it up in that exact same state... but in all actuality that probably wouldn't help as what is causing this is probably gamedbd itself (or file permissions)

  7. #7
    Proficient Member michae5k is offline
    MemberRank
    Jan 2009 Join Date
    LondonLocation
    177Posts

    Re: Database in memory

    My guess is that files were accidentally deleted or whatnot, the issue i have is that i currently have an update to upload, however i cant expect the admin to stop the server for upload and basically wipe the DB.

    if i cant find a solution, we will have to reload to a previous back up.
    im just searching for a solution (which PW should have incorporated) so whilst the server is still up and the db is intact (in memory) i would like to basically get the data back to the form of flat files so i can do a restart and have not lost the relevant game data.

    Unfortunately in my dev experience i have never come across this issue, so thought is ask the community in case someone else has suffered this issue.

  8. #8
    Robb rbb138 is offline
    MemberRank
    Jan 2009 Join Date
    London, EnglandLocation
    1,241Posts

    Re: Database in memory

    Only solution i can find is to connect a custom made daemon to your running gamedbd and pull the data out, restart the gamedbd on empty files and then save the data back in.

  9. #9

    Re: Database in memory

    check your disk's run the df command in terminal and see if anythings running 100% if so free up some space, it should solve it.
    Last edited by softsoldier; 14-11-11 at 02:19 AM.

  10. #10
    Proficient Member michae5k is offline
    MemberRank
    Jan 2009 Join Date
    LondonLocation
    177Posts

    Re: Database in memory

    That is entirely unrelated to the issue im facing.
    The game db has been deleted, once the server is restarted all existing data will be lost as the only exiting data is stored in volatile memory...once again this is in no way a hardware issue.

    If anyone does indeed understand the issue and have any nuggets they would care to share, i would be most grateful as i am otherwise resetting the data on Thursday.

    Thanks

  11. #11
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: Database in memory

    How do I dump physical memory in Linux? - Super User

    As I said before it is probably a file system permission issue... The above will allow you to at least dump it to disk so that when you get it resolved you can bring everything back up...



Advertisement