05-17-2013, 12:54 PM | #421 |
Guru
Posts: 716
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
Resizing of covers is the only performance issue on any computer, in my experience.
On my NAS, Synology DS-110j (128Mb main memory), I use the setting Code:
$config['cops_recentbooks_limit'] = '50'; Code:
$config['cops_recentbooks_limit'] = '250'; When you have a lot of books from one writer or if you have a lot of books with the title starting with the same letter it really can become an issue. However in my experience if you use a server running Debian or any other flavour of Linux the reading app stays reasonably responsive even when the CPU of your NAS is at 100%. |
05-18-2013, 04:25 PM | #422 | ||||
Addict
Posts: 369
Karma: 37869
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
|
Quote:
Quote:
I had the same issue, I added a cache header (a simple workaround I agree) so that going on the same page after a few day don't burn your CPU again. I also thought about using Nginx caching system but lost interest. I don't think I'll add that myself to COPS, but I'll happily review and merge any clean patch about it. Quote:
Anyway this issue has already been reported : https://github.com/seblucas/cops/issues/27 I'll do it but don't know when. Quote:
|
||||
Advert | |
|
05-20-2013, 06:18 AM | #423 | |
Guru
Posts: 716
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
Quote:
Did you use any specific settings for COPS? I will try the cache header settings on my Debian COPS server later. Maybe the results are more consistent there. Or maybe I need to read up about this topic some more! |
|
05-22-2013, 09:53 AM | #424 | |
Addict
Posts: 369
Karma: 37869
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
|
Quote:
Code:
$expires = 60*60*24*14; header("Pragma: public"); header("Cache-Control: maxage=".$expires); header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT'); |
|
05-22-2013, 03:44 PM | #425 | |
Guru
Posts: 716
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
Quote:
Code:
## Cache <ifModule mod_headers.c> Header unset Pragma # remove and disable ETag Header unset ETag FileETag None # remove Last-Modified Header unset Last-Modified # cache images for 10 days <FilesMatch "\.(jpg|ico|jpeg|png|gif)$"> Header set Cache-Control "max-age=864000, public, must-revalidate" </FilesMatch> # cache epub/opf/pdf docs for 10 days <FilesMatch "\.(epub|mobi|opf|pdf)$"> Header set Cache-Control "max-age=864000, public, must-revalidate" </FilesMatch> # cache html/htm/xml/txt diles for 2 days <FilesMatch "\.(html|htm|xml|txt|xsl)$"> Header set Cache-Control "max-age=7200, must-revalidate" </FilesMatch> </ifModule> I may have to rethink my storage strategy. More required. Anyone with a brilliant idea to make this work? |
|
Advert | |
|
05-23-2013, 11:06 AM | #426 |
Junior Member
Posts: 1
Karma: 10
Join Date: Jan 2013
Device: nexus 7
|
Hi!
Any news on the synology package? I've been looking on the Synocommunity's repo, but they still have the 0.3.4 version. Just for clarification, I have a custom column (language). Is it supported on the new version? Thanks for this really useful software! |
05-23-2013, 04:45 PM | #427 | |
Addict
Posts: 369
Karma: 37869
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
|
Quote:
https://github.com/SynoCommunity/spksrc/pulls There's a lot of pull request waiting (and of course my own). I'll try to build a package myself this weekend. Only some custom columns are supported for now (you can check it on the config_default.php) |
|
05-24-2013, 04:38 PM | #428 | |
Addict
Posts: 369
Karma: 37869
Join Date: Sep 2011
Device: Kobo eReader Touch, Kobo Aura HD
|
Quote:
Thanks. |
|
05-24-2013, 07:26 PM | #429 | |
Guru
Posts: 716
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
Quote:
It was my understanding that for the "header command" to work in Apache the module mod_headers.c should be loaded. Just like for x-sendfile and rewrite (now no longer needen for COPS to work perfectly). For these commands to work in Apache the corresponding modules (mod_xsendfile.c and mod_rewrite.c) should be loaded and active. In my version of Apache for Windows (WAMP) mod_headers.c was not enabled. Hence my statement that "this code cannot work in Apache". I omitted to add "unless you enable mod_headers.c. Since then I found (about) the same code vlad59 used in fetch.php. There was no mention of the need to enable mod_headers.c. So I may be wrong in assuming the module needed to be loaded for it to work in Apache. I just completed a little testing. My browser Firefox (21.0) under OSX caches the covers. there is no significant CPU activity except the first time when covers are converted to thumbnails. It does not seem to matter if mod_header.c is loaded or not. Caching by firefox is what I expect to happen. To know if the headers code of COPS works I will have to test over time. I will keep an eye on it. However I distinctly remember that when I tested on a slower Windows 7 PC with less memory I saw a lot (100%) of cpu activity every time I "revisited" a library after I used an other library. Mod_headers.c was not loaded then. I do not see this behavior now with the faster PC and a new installation of WAMP and COPS. @vlad59: can you follow my reasoning? [A possible explanation is that the Apache installation of WAMP on my old PC has become "corrupted" as a result of a bit to much experimenting over time. One or two other things do not seem to work as I expect them to.] |
|
05-25-2013, 04:48 AM | #430 |
Connoisseur
Posts: 88
Karma: 490410
Join Date: Jul 2010
Device: iPad & Bebook Neo
|
@mariosipad
Are you now stating that the slower pc was the problem and that after installing everything on a faster pc without installing the module everything works fine? |
05-25-2013, 03:12 PM | #431 |
Member
Posts: 10
Karma: 10
Join Date: May 2013
Device: Nexus 7 tablet
|
Hi, I'm having a bit of trouble getting this working on my Synology 411+ running DSM 4.0 and not sure what I've done wrong. I also tried skimming through this thread to see if I could find an answer on my own, but it's very long and a lot of it is too technical for me to follow. I do apologize in advance if this is a question already answered that I ought to have found. Any help would be appreciated!
I followed all the steps given on https://github.com/seblucas/cops/wiki/Howto---Synology using the "if you want your Calibre directory inside your webroot" option as that seemed the simpler of the two. I also eventually remembered that I had to set up port forwarding for port 80 in my router configuration utility as I had not previously enabled WebStation and the EZ-Internet automatic configuration isn't supported on my router. My file structure within the "web" folder is single directory named "Calibre" containing two subdirectories named "cops-master" and "Data." The "Data" file contains all my folders with the books and the metadata file, and Calibre on my PC is now using it as its library with no problem. I had a bit of difficulty figuring out how to edit the config_local.php file, per step 6, but finally downloaded it to my Windows desktop, edited it in notepad, saved it, and moved it back to the "cops-master" folder, overwriting the original. I also had a bit of difficulty following the instructions as to what the directory paths were and where in the config file they go; I don't know if this was partly because using Notepad, the file is very hard to read. I've never worked with php files before so I'm not really too familiar with the format. In any case, I changed both those values to './Calibre/Data/'. As I said, I'm having no problem with Calibre itself using the library at that location. However, when I tried to add my library as a custom OPDS catalog in FBReader on my Nexus7 tablet, I tried it both as [hostname]/Calibre, using the hostname I have for Synology DDNS, and as [IPaddress]/Calibre, and either way FBReader returns a HTTP/1.1 403 Forbidden error. Before I remembered to set up port forwarding for port 80, I was just getting request for username and password but authentication would repeatedly fail. If I leave off the /Calibre part and just put in my hostname or IP address, FBReader says "This is not an OPDS catalog." What did I goof up that would make FBReader unable to access my library? |
05-26-2013, 06:52 AM | #432 |
Connoisseur
Posts: 88
Karma: 490410
Join Date: Jul 2010
Device: iPad & Bebook Neo
|
Are all the cops files in the subdirectory cops-master or in the directory calibre? Seeing your ./Calibre/Data they should be in ./Calibre. Are they?
|
05-26-2013, 12:25 PM | #433 |
Member
Posts: 10
Karma: 10
Join Date: May 2013
Device: Nexus 7 tablet
|
All the COPS files were in the "cops-master" directory because when I unzipped the file as instructed, they were automatically unzipped into that directory. I moved all the files that were in ./Calibre/cops-master and put them in ./Calibre and I get now a different error when I try to add the library in FBReader. Now it says "HTTP/1.0 500 Internal Server Error." Is that progress? ;-)
|
05-26-2013, 01:21 PM | #434 |
Connoisseur
Posts: 88
Karma: 490410
Join Date: Jul 2010
Device: iPad & Bebook Neo
|
Do you add the library <yourip>\Calibre\index.php or feed.php. I would first try using safari or internet explorer. Then you know it works.
|
05-26-2013, 01:31 PM | #435 |
Guru
Posts: 716
Karma: 10738
Join Date: Nov 2012
Device: iPad & iPhone with Marvin 2 + 3 & Kobo Glo HD
|
@jlsturgeon
What you can do: 0 - Update your Synology firmware to DSM 4.2 (maybe not necessary for COPS but it's good te be up-to-date). 1 - Organize your files on your synology in the following way: a - put all your files you want to access with a browser on ereader in the directory "web" on your Synology Diskstation b - put the COPS files in a directory "Calibre" c - put all your calibre files inside a directory "data" inside the directory "calibre" in the "web" directory d - edit the file config_local.php to contain the following line: Code:
$config['calibre_directory'] = "./data/"; Code:
http://<IP_of_your_synology/calibre/checkconfig.php g - if there are errors post them here |
Tags |
calibre opds, dns, kobo aura, synology |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre OPDS server with windows apps? | nickdma | Related Tools | 10 | 03-03-2024 02:53 PM |
[Old Thread] Android FBreader and Calibre OPDS server question | kalex | Calibre | 5 | 12-24-2015 10:16 PM |
PHP+Apache web server for calibre ... | chaley | Related Tools | 254 | 04-28-2014 08:18 PM |
External OPDS catalogue in Calibre | bolton | Calibre | 1 | 09-05-2012 06:14 AM |
Calibre Command Line usage with PHP | artoros | Related Tools | 13 | 07-01-2010 09:57 AM |