Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Server

Notices

Reply
 
Thread Tools Search this Thread
Old 12-16-2017, 05:55 PM   #1
Geremia
Addict
Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!
 
Posts: 235
Karma: 100000
Join Date: Oct 2012
Device: Calibre
content-server and CALIBRE_CACHE_DIRECTORY

Running the content-server, I noticed my CALIBRE_CACHE_DIRECTORY gets very large (>2 GB) very quickly. Why is this? What are all the temp files for? It appears many of the actual PDFs etc. are being copied to the cache directory. Does this have something to do with zero-copy file transfers?
Geremia is offline   Reply With Quote
Old 12-16-2017, 09:32 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
When the content server sends files it has to update metadata in them, and it does not do that to the copies in the library. Which means it has to make a copy of the file outside the library. Those files are kept around so that the operation does not need to be repeated each time a request for the file is made.
kovidgoyal is offline   Reply With Quote
Advert
Old 12-17-2017, 10:03 PM   #3
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 516
Karma: 32106
Join Date: Feb 2012
Device: Onyx Boox Leaf
Are you talking about the srvb folder?

It has become a problem for me to sync the whole Calibre Portable to Cloud services (I currently choose to ignore that folder). Maybe Calibre should clean it up time by time based on the last access date, or set a size limit?
nqk is offline   Reply With Quote
Old 12-18-2017, 06:47 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It's a cache folder, why are you syncing it? calibre portable has to use only the portable folder for everything, so if you are using calibre portable, simply exclude the cache folder from your syncs.
kovidgoyal is offline   Reply With Quote
Old 12-18-2017, 11:25 AM   #5
Geremia
Addict
Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!
 
Posts: 235
Karma: 100000
Join Date: Oct 2012
Device: Calibre
Quote:
Originally Posted by kovidgoyal View Post
When the content server sends files it has to update metadata in them, and it does not do that to the copies in the library. Which means it has to make a copy of the file outside the library. Those files are kept around so that the operation does not need to be repeated each time a request for the file is made.
Is it safe to delete the /tmp/calibre-3.14.0-* folder if it gets too large, or does Calibre do its own garbage collection on it?
Geremia is offline   Reply With Quote
Advert
Old 12-18-2017, 01:58 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre cleans up temp files automatically, you should never delete temp files while it is running
kovidgoyal is offline   Reply With Quote
Old 12-12-2018, 03:50 PM   #7
Geremia
Addict
Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!
 
Posts: 235
Karma: 100000
Join Date: Oct 2012
Device: Calibre
Quote:
Originally Posted by kovidgoyal View Post
When the content server sends files it has to update metadata in them
Why does it do that? What metadata is updated?
Geremia is offline   Reply With Quote
Old 12-12-2018, 05:48 PM   #8
Adoby
Handy Elephant
Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.Adoby ought to be getting tired of karma fortunes by now.
 
Adoby's Avatar
 
Posts: 1,736
Karma: 26785668
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Thinkpad E595, Ubuntu Mate, Huawei Mediapad 5, Bouye Likebook Plus
Calibre implements lazy update of ebooks. If you update metadata for a book this is updated in the database but not inside the actual ebook file. When you send the ebook file the ebook file is updated in the sent copy of the ebook file. Possibly based on plugboards and/or when converted.

This means that ebook files don't have to be updated all the time. They can stay unchanged in their original pristine state. This is very good for safety reasons as well as for performance reasons. You may change metadata many times, for instance in batch jobs, but you might never actually send/save a copy of the ebook file. Or just a few times compared to how often you may update metadata. To update metadata in the database is very fast. To update metadata in the ebook file is very slow. In comparison, at least.

It is possible to to force calibre to update metadata inside the ebook files. In effect overwriting the original ebook file. Make sure you have good backups before you do that...

Last edited by Adoby; 12-12-2018 at 05:55 PM.
Adoby is offline   Reply With Quote
Old 09-04-2021, 11:18 PM   #9
Geremia
Addict
Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!
 
Posts: 235
Karma: 100000
Join Date: Oct 2012
Device: Calibre
Quote:
Originally Posted by kovidgoyal View Post
When the content server sends files it has to update metadata in them
Why? What metadata needs to be updated?
Geremia is offline   Reply With Quote
Old 09-04-2021, 11:44 PM   #10
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Geremia View Post
Why? What metadata needs to be updated?
When you edit metadata in the library, calibre does not update the actual book. It only updates the database. The books will be updated when you do something that takes the book out of the library, such as doing a save-to-disk or send-to-device and when downloading the book using the server. If you want the book inside the library updated, it will be done during actions such as a conversion, editing the book, Polish books or using the Embed metadata function.
davidfor is offline   Reply With Quote
Old 09-05-2021, 12:38 AM   #11
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,280
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Geremia View Post
Why? What metadata needs to be updated?
Short and simple answer is any metadata that was not read from the ebook during the import process.

To expand a bit, some people may be happy with the crap that passes for metadata in many downloaded ebooks. Others prefer to correct errors, add a decent cover image, etc. For many people, their workflow is download the book and import it into calibre. Then they update the metadata since the series is missing or incorrect, the book comment is blank, perhaps you want to update the cover, correct the author name since you are CERTAIN that Unknown did not write the book, they want to remove the mass of tags that many authors/publishers seem to use to "optimize" their books showing up in searches and replace them with more useful (to you) tags, etc.

This modified information is not added to the copy of the book in your calibre library unless you deliberately choose to do so (Polish, Embed Metadata, Modify Epub, whatever). When you export the book from your library by sending to your device, saving to a folder or download from the content server, prior to sending the book, a temporary copy will be created and updated with that modified metadata.

Hopefully, this helps you a bit.

Last edited by DNSB; 09-05-2021 at 12:41 AM.
DNSB is offline   Reply With Quote
Old 09-05-2021, 07:56 PM   #12
Geremia
Addict
Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!Geremia rocks like Gibraltar!
 
Posts: 235
Karma: 100000
Join Date: Oct 2012
Device: Calibre
Quote:
Originally Posted by davidfor View Post
When you edit metadata in the library, calibre does not update the actual book. It only updates the database. The books will be updated when you do something that takes the book out of the library, such as doing a save-to-disk or send-to-device and when downloading the book using the server.
Quote:
Originally Posted by DNSB View Post
This modified information is not added to the copy of the book in your calibre library unless you deliberately choose to do so (Polish, Embed Metadata, Modify Epub, whatever).
Thank you. This helps.
Geremia is offline   Reply With Quote
Old 09-06-2021, 04:02 AM   #13
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,866
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by davidfor View Post
When you edit metadata in the library, calibre does not update the actual book. It only updates the database. The books will be updated when you do something that takes the book out of the library, such as doing a save-to-disk or send-to-device and when downloading the book using the server. If you want the book inside the library updated, it will be done during actions such as a conversion, editing the book, Polish books or using the Embed metadata function.
You can configure Calibre to not update the metadata when you do actions such as save-to-disk. I don't want Calibre doing to the updating. If I want it done, I'll do it by hand in the editor (and I have the editor configured to not update the metadata when loading the ePub).

IMHO, the default should be to not update the metadata like is done now and let the user turn that on if wanted.
JSWolf is offline   Reply With Quote
Old 09-06-2021, 04:20 AM   #14
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by JSWolf View Post
You can configure Calibre to not update the metadata when you do actions such as save-to-disk. I don't want Calibre doing to the updating. If I want it done, I'll do it by hand in the editor (and I have the editor configured to not update the metadata when loading the ePub).

IMHO, the default should be to not update the metadata like is done now and let the user turn that on if wanted.
Sorry, that's just wrong. And bad advice. Why on earth to you want to edit the metadata twice? Once in the calibre metadata editor and again manually when editing the book? And do you also turn of the metadata update when sending to the device? And turn off the update to your Kobo devices?
davidfor is offline   Reply With Quote
Old 09-06-2021, 04:35 AM   #15
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,544
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by davidfor View Post
Sorry, that's just wrong. And bad advice. Why on earth to you want to edit the metadata twice? Once in the calibre metadata editor and again manually when editing the book?
In my case to remove what I regard as clutter from the book format file - e.g. description, subject, commercial identifiers etc. I only have the books I'm reading and a few reference texts on my devices - rarely more than a dozen.

BR
BetterRed is offline   Reply With Quote
Reply

Tags
content-server

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
installing Calibre content server 3 on ubuntu server 16_04 khyox Calibre 22 01-06-2018 11:34 PM
Content server on ubuntu 12.04 headless server ImageMagick: libltdl.so.7 Cool Javelin Calibre 5 04-08-2015 02:20 AM
Calibre Content Server and Windows Home Server 2011 HughMcC Calibre 8 10-01-2014 07:26 AM
500 Internal Server Error accessing content server Calibre 0.8.8 DaddyO57 Calibre 1 07-20-2012 06:08 PM
Content server not serving all content. False_Chicken Calibre 0 10-19-2011 05:56 PM


All times are GMT -4. The time now is 02:00 AM.


MobileRead.com is a privately owned, operated and funded community.