07-24-2018, 04:37 PM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jul 2018
Device: iPad
|
Calibre Server Times Out for Large Books
My Calibre server works fine for small items, but times out on anything a little bit large. I get the error message "...could not open the page because the server stopped responding" on the client. It's running on OS X 10.11.6 (El Capitan).
Any thoughts on the best way to approach this problem? |
07-24-2018, 11:13 PM | #2 |
creator of calibre
Posts: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Look at the server logs. And what page is timing out? Book size should not affect anything other than trying to read the book in the browser.
|
Advert | |
|
07-25-2018, 09:38 AM | #3 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jul 2018
Device: iPad
|
Here's what I'm seeing in the logs: [My notes are in square brackets]
Access Log: [Accessing Calibre server from a device at 192.168.1.138] 192.168.1.138 port-62584 - 25/Jul/2018:08:16:35 -0500 "GET /get/PDF/2751/Calibre_Library_1 HTTP/1.1" 200 61300738 [Requesting a large PDF] Error Log: calibre server listening on 0.0.0.0:8080 OPDS feeds advertised via BonJour at: 192.168.1.24 port: 8080 Unhandled exception in state: State: write_buf Client: 192.168.1.138:62584 Request: GET /get/PDF/2751/Calibre_Library_1 HTTP/1.1 Traceback (most recent call last): File "site-packages/calibre/srv/loop.py", line 569, in tick File "site-packages/calibre/srv/http_response.py", line 572, in write_buf File "site-packages/calibre/srv/http_response.py", line 371, in write File "site-packages/calibre/srv/sendfile.py", line 90, in sendfile_to_socket_async IOError: (57, 'Socket is not connected') |
07-25-2018, 09:51 PM | #4 |
creator of calibre
Posts: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
According to that log the connection is being disconnected in the middle of a send. Something in the network path between the client and the server is likely causing that. I suggest you start by simply running the server on localhost and connecting to it o localhost and verify that it works there.
|
07-27-2018, 03:54 PM | #5 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jul 2018
Device: iPad
|
It works fine from localhost, but if it's time-dependent, I haven't given it much of a test. A larger PDF I was using for testing was 172MB, which seems to take about three seconds over localhost. Over the WiFi, much more time would be required, so if there's a short time limit for the server...
I looked in Calibre for server settings and I didn't find any time settings I could increase. I don't mind manipulating server setup files, but I haven't done that in years. Should I be looking in /etc/apache2/conf/extra? |
Advert | |
|
07-27-2018, 04:40 PM | #6 | |
Wizard
Posts: 2,082
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
|
Quote:
Check and see if you have a conflict with two processes using the same port. Code:
netstat -an -Ptcp | grep tcp4 |
|
07-27-2018, 09:38 PM | #7 |
creator of calibre
Posts: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It's not a server timeout, the error you posted from the logs indicates that the server still thinks the connection is open, which means that something else has closed the connection. But if you wish to increase server timeouts, the options are in the advanced section of Preferences->Sharing over thenet at the bottom.
You can also try disabling zero copy transfers in the same place. |
07-28-2018, 03:21 PM | #8 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jul 2018
Device: iPad
|
Thanks for the help, Kovid. You are correct. The problem was with my iPad and large files, not the server. Below are some tips that may help others with the same problem.
When transferring large (~200MB and larger) PDF files from Calibre server to iPad: * Disable Zero Copy Transfers at the server (as Kovid explains above). * Empty the cache of whatever browser you use. * Have patience. And, even when the transfer seems complete, you may have to wait a minute before the "Share" button is responsive, and wait a bit more until the "Copy to Adobe Acrobat" button will respond and copy your PDF into Acrobat. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Download all books from Calibre Server | Paloran | Library Management | 4 | 08-23-2020 11:35 PM |
calibre-sync: Automatically download books from your Calibre Content Server onto Kobo | mishagale | Related Tools | 14 | 05-13-2019 05:18 PM |
Adding large number of books to Calibre got signifficantly faster. Thank you Kovid | kacir | Calibre | 9 | 11-16-2014 04:45 PM |
If a world was three times as large as Earth, how long would a day be? | John Carroll | Writers' Corner | 64 | 01-03-2011 12:20 PM |
Autodetected Calibre content server times out | NeoDevin | Calibre | 14 | 07-08-2010 09:55 PM |