PDA

View Full Version : Importing hands fails after a few sessions...



majic
11-17-2008, 02:01 AM
I've run into this scenario over and over. As updates seemed to be coming out, I pretty much just lived with it, but at this point it is very very frustrating and as my hand history becomes larger with HEM, fixing it takes longer and longer.

The issue:

1) Start new database
2) Start playing sessions
3) Hands import fine, hud works fine
4) Play several sessions over a few days, everything is great. Change nothing.
5) On xth session, no hands import.
6) Look in hands directory... files are still there.
7) Try to manually import: Says no files found.
8) Move hands to a different directory.
9) Try to import from different directory. It finds them, but reports them as duplicate hands.
10) Get mad.
11) Export ALL hands from database.
12) Create new database.
13) Import ALL hands (and wait). The missing hands show up (which were exported from the database, mind you... which means they were there... but probably not put into the database correctly).
14) Rinse and repeat after another 3-5 sessions.

There is no indication that something has gone wrong for it to stop importing.

Interestingly enough, one time I simple ignored it and kept playing sessions and a few days later it started picking up hands again without any intervention on my part.

Also worth noting that even though the hands don't show up in the reports, the hud always works.

No, I didn't change my filters. No, clearing the filters didn't produce different results. Changing the user and changing back didn't produce different results, ad nauseum.

I'm playing 25nl on Stars, 6-max, both 50bb min, fast and normal tables.

I'm using version 1.06.04beta20 (I got this version hoping it would fix the issue which I've seen since I purchased it some time ago).

I've installed it on my D: drive (as opposed to C:). Not sure if that is an issue, but I know some programs that make assumptions about the user using C:.

Based on the fact that exporting and reimporting works would seem to indicate that something got corrupted during the inserts. The hand history file obviously made it into the database (probably with some of the other data) since I'm able to export (and I remember digging around your DB schema and saw a table for the hand histories).

Is it possible you are eating some exceptions when doing the inserts? Are you validating all the values before the inserts (so that bad, blank, null, etc data can't go into the database)...?

morny
11-17-2008, 05:47 PM
The 2 most common causes of this problems are 1) powering off your computer or having your computer lose power while the database is doing something and 2) an old drive with bad sectors on it. Basically what happens is a small portion of a file gets slightly corrupt and then when you reboot and windows goes into that checkdsk procedure it finds the bad section and, thinking it is doing a good thing, removes it. Postgres then loads the table and a portion of it is gone so it doesn’t like that and blocks access to the entire table. Normally when this happens it is on a completely useless file that you'll never even notice is now gone and quite often it will happen to an index in the DB which can easily be rebuilt but in your case it happened to a system table.

So, to protect against this

1) keep you hands histories in case you do need to reimport
2) use a power bar and avoid hard shutdowns (when you flick the power switch on the pc)
3) if your drive is old consider replacing it with a new one. They are cheap and much faster now than even a few years ago.

So try those steps and come back if you still have problems, i have tons of databases, im mine alot, i use several databases to test hands people send me daily and ive got 1 corruption in all that time and that was before HM was even released so its likely one of the above

majic
11-20-2008, 03:47 AM
I'll test out that chkdsk theory. I've uninstalled and re-installed postgreSQL to a different drive. I'll update with the results soon...

cjmcculley
11-20-2008, 10:09 AM
I have a very similar problem, which I am going to contribute to my external hard drive at some point not recognizing a transfer of files from the main directory to the HMArchive. I'm going to take the advice and not convert to the HMArchive and see if that solves the problem. I have the new update and no loss of power at any time during the imports.

majic
12-10-2008, 12:37 AM
So I thought I'd share that since my last post I've had 0 issues.

Installing PostgreSQL to a different drive did the trick and it has been correctly importing hands since.

Perhaps getting this into the FAQ as one means of trying to troubleshoot/fix import issues that occur sporadically like I experienced would be helpful to others.