database or disk full

greenorange
Posts: 6
Joined: 28 May 20 11:26

Re: database or disk full

Post by greenorange »

Hi Hert,
I'm folloing this discussion and befor I try changing the srcatch folder, I have a question, can I move it to an external hard drive via the script mentioned above without encountering problems? Thank you!
Hert
Posts: 7911
Joined: 13 Sep 03 6:24

Re: database or disk full

Post by Hert »

The scratch disk is a SQLite feature called temp store. I think you could use an external drive but make sure it remains connected. Try it, then restart psu, then compact the catalog and check if a file is created in the folder.
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
fbungarz
Posts: 1828
Joined: 08 Dec 06 4:03
Location: Arizona, USA

Re: database or disk full

Post by fbungarz »

Thanks Hert for the clarification.
Cheers,
Frank
greenorange
Posts: 6
Joined: 28 May 20 11:26

Re: database or disk full

Post by greenorange »

Hert wrote: 14 Sep 20 18:35 The scratch disk is a SQLite feature called temp store. I think you could use an external drive but make sure it remains connected. Try it, then restart psu, then compact the catalog and check if a file is created in the folder.
Thank you, Hert!

I will try and see if it works. If not, I'll come back here :-)

Cheers

Katja
greenorange
Posts: 6
Joined: 28 May 20 11:26

Re: database or disk full

Post by greenorange »

greenorange wrote: 15 Sep 20 11:41
Hert wrote: 14 Sep 20 18:35 The scratch disk is a SQLite feature called temp store. I think you could use an external drive but make sure it remains connected. Try it, then restart psu, then compact the catalog and check if a file is created in the folder.
Thank you, Hert!

I will try and see if it works. If not, I'll come back here :-)

Cheers

Katja
Hi Hert,

now I've tried to change the scratch disk with the scripter as follows:

-A "E:\Eigene Dateien\Photosupreme_temp\"

I took that script from Michael Weidner's Website.

I got the following error message:

Syntax error.
source position 1,1

I'm not sure what is wrong?

Thanks very much!

Regards

Katja
vkfoto
Posts: 289
Joined: 19 Oct 16 2:51

Re: database or disk full

Post by vkfoto »

I think you picked the wrong parameter. I used
SQLite scratch folder: This setting will move the SQLite scratch folder to somewhere else
WriteToRegistry('', 'SQLiteTempDir', 'c:\your folder here\');
put this in the Scripter and it worked.
greenorange
Posts: 6
Joined: 28 May 20 11:26

Re: database or disk full

Post by greenorange »

Hi,

Thanks for the quick reply! Yes, of course I used the wrong script. :oops: It seems that my brain goes into meltdown when it sees any type of script... Used the right one now and it worked (who would have guessed...) So, thanks again! :)

Regards

Katja
fbungarz
Posts: 1828
Joined: 08 Dec 06 4:03
Location: Arizona, USA

Re: database or disk full

Post by fbungarz »

Hi Hert,
OK, I used the script to move the scratch folder to 'G:\PSu-scratch':
PSu_move-scratch-disk.jpg
PSu_move-scratch-disk.jpg (60.1 KiB) Viewed 19233 times
Then I started the compact.
But NOTHING is happening in 'G:\PSu-scratch'.

INSTEAD there is a idimager.cat.db-journal file building inside the same folder where the catalog resides !!!
It is NOT being built in any temporary folder.
It grows until it reaches the size of the database and then disappears. Afterwards I receive the message that the database was compacted successfully.

Now, I am using a custom registry to start PSu.
"C:\Program Files\IDimager Products\Photo Supreme x64\IDimagerSU.exe" -regdb "C:\PSU Catalog\PSU.idreg" -A "C:\PSU Catalog"

Is it possible that the script writes to the Windows-Registry and not the custom registry?

Thanks,
Frank

PS: I was fortunate that the program would not return the "disk full" error, because I decided to try compacting only the regular database and not the thumbnail database.
Hert
Posts: 7911
Joined: 13 Sep 03 6:24

Re: database or disk full

Post by Hert »

The journal file is *not* a temp file. The SQLite temp files have a random name.

With the SQLite temp folder set to a folder on another drive you will still need at least 100% of the database size as free space on the drive that stores the database; e.g. a 100MB database needs at least 100MB of free disk space if the temp folder is on another drive. With the temp folder on a folder on the same drive you need 200%; that 100MB database then needs 200MB free disk space. Please remember that all this is a SQLite feature, and this is how SQLite works.

Personally I recommend to not fiddle with the temp folder in SQLite. Delete this registry tweak, and change the Windows temp folder instead.
SQLite has also marked temp folder setting as deprecated and so it may well be that in a new update of SQLite they omitted this setting completely.

Here's a link with info on how to change your Windows temp folder (and don't forget to delete the registry tweak)
https://www.howtogeek.com/285710/how-to ... her-drive/
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
fbungarz
Posts: 1828
Joined: 08 Dec 06 4:03
Location: Arizona, USA

Re: database or disk full

Post by fbungarz »

Well, on my system the tweak definitely does NOT work. There is NOTHING being written to the temp folder after I applied this tweak. I watched the folder and even enabled "hidden files" and hit refresh several times during compact. So, the tweak simply doesn't work (at least not here).
With the SQLite temp folder set to a folder on another drive you will still need at least 100% of the database size as free space on the drive that stores the database; e.g. a 100MB database needs at least 100MB of free disk space if the temp folder is on another drive.
Might have helped to have known that one before :shock:

Cause if that is the case then moving my temp folder makes no difference. With the space left on my C drive, it now perhaps allows compacting the main database, but the one with thumbnails is definitely too big.

Back to square one:
Copy database over to another drive, use SQLite to compact, move back...
:?
Hert
Posts: 7911
Joined: 13 Sep 03 6:24

Re: database or disk full

Post by Hert »

Maybe the PostgreSQL version is the solution for you. No more worries with compacting. But less portable as the database isn’t “just a file”.
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
fbungarz
Posts: 1828
Joined: 08 Dec 06 4:03
Location: Arizona, USA

Re: database or disk full

Post by fbungarz »

I already run a few MySQL databases via WAMP. Would that work?
Hert
Posts: 7911
Joined: 13 Sep 03 6:24

Re: database or disk full

Post by Hert »

Psu Server works with PostgreSQL or Microsoft SQLServer
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
Hert
Posts: 7911
Joined: 13 Sep 03 6:24

Re: database or disk full

Post by Hert »

MySQL works good for simple database structures. That makes it a popular solution for websites, like this forum.
Performance of MySQL gets bad with complex queries and even worse when when using nested views. That makes MySQL a bad fit for PSU's feature set.
The PostgreSQL database is a modern, higher grade database system that performs excellent, is constantly being developed, is very(!!) robust, is widely used, and being open source you can install it without additional cost.

https://hackr.io/blog/postgresql-vs-mys ... 0intricate.
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
Post Reply