01-01-2015, 06:24 PM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Mar 2009
Device: Sony PSP
|
Timeouts when sending large books to Kindle HD 7
The mobile device is a Kindle Fire 7 HD (4th Generation) with Fire OS 4.5.2 and Calibre Companion version 3.5.9. The server is a Linux box running Ubuntu 14.04.1 LTS and calibre version 2.14.0.
On the mobile device, I started up CC and connected to the Linux box using the wireless device connection which succeeded with no errors. In calibre, I selected a single book -- "The Stories: Five Years of Original Fiction on Tor.Com" -- and clicked "Send to device". The calibre window went grey for a moment, then attempted to upload the book. For the first 30-45 seconds or so, the status was "Working..." and the progress was "Unavailable", then status changed to "Transferring books to device..." and the progress was 2%. This was unchanged until the running time reached 5m 48s at which point the status was "Error", progress was 100%, and a dialog box popped up with "Error communicating with device". Here is the traceback as copied to the clipboard: calibre, version 2.14.0 ERROR: Error: Error communicating with device timed out Traceback (most recent call last): File "site-packages/calibre/gui2/device.py", line 87, in run File "site-packages/calibre/gui2/device.py", line 584, in _upload_books File "site-packages/calibre/devices/smart_device_app/driver.py", line 50, in _synchronizer File "site-packages/calibre/devices/smart_device_app/driver.py", line 1444, in upload_books File "site-packages/calibre/devices/smart_device_app/driver.py", line 682, in _put_file File "site-packages/calibre/devices/smart_device_app/driver.py", line 573, in _send_byte_string timeout: timed out The last notification I saw on the mobile device was titled "Syncing with calibre ..." and said "Receiving books from calibre" and "Receiving "The Stories: Five Years of Original Fiction on Tor.com":". The progress bar gets maybe one-third of the way across before failing. To be fair, that book is fairly large -- but the same book and others had no trouble transferring to my Kindle Fire 1st Generation device. At this point, the server no longer saw the mobile device as being connected while the mobile device thought it was still connected. Hitting 'disconnect' on the mobile device caused a dialog box to be displayed, reporting an unrecognized error during the connection progress and instructing me to try again. However, the mobile device cannot successfully reconnect to the server unless it is power-cycled -- force-stopping the application does not resolve the issue. A second run succeeds in moving the progress bar to about two-thirds of the way. A *third* run starts over again and only gets to one-third. Whee! Smaller books do transfer correctly, individually and when selected as a group. If there is any additional information I can give to help diagnose this issue, please let me know. Thanks! Jack. |
01-02-2015, 03:47 AM | #2 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I looks like something on your network is breaking the connection between your device and your computer. The fact that you must power-cycle the device implies that the problem is somewhere inside your kindle, because it is holding on to the network socket. I suspect that waiting a couple of minutes for the network to time out will also work. It could also be something related to your wireless router and interference from neighbor access points.
Debug logs might help determine what is happening. Follow the instructions in this FAQ answer. Once you have calibre running in debug mode, try sending the book. When it fails, quit calibre, capture the debug log and email it to me at cc_debug_logs at charles dot haleys dot org. When you send the CC debug log, please erase the MultiPie address. No reason to clutter my son's inbox. |
Advert | |
|
01-02-2015, 03:26 PM | #3 |
Junior Member
Posts: 7
Karma: 10
Join Date: Mar 2009
Device: Sony PSP
|
I started calibre, noticed a new version was out, and updated to 2.15.0 before starting debug mode. I then tried to upload the problem book (144.9 MB), and it succeeded in 37.197 seconds according to the logs. I restarted calibre to disable debug mode and tried the other problem book (252.3 MB), and that one failed as before -- progress stopped roughly one-third into the book in about a minute or two, then waited four minutes or so for the timeout. As before, the timeout message appeared on the server and not on the mobile device. I waited five minutes by the clock, and the mobile device continued to display "Syncing with calibre ...". Hitting the back-arrow did nothing. Hitting the home icon then reopening the app brought up the app without the notification but still thinking it was connected. As before, hitting "disconnect" brought up "General connection error". I hit OK, and waited five minutes by the clock (mobile device went to sleep, had to wake it up), and still got the "Failed to connect" dialog box.
My wireless network is pretty reliable. It's currently not very busy and throughout the entire process the mobile device had a four-bar connection -- signal strength "Excellent" and Link speed "65Mbps". My theory (and I'm only a novice Android app developer, so take it for what it is) is that the CC connection code has a bug keeping it from letting go of the connection, and that connection state is persisting which is why rebooting is the only way to make the app let go of that socket. By the way, tried to upload the big file in debug mode, timed out after 326.718 seconds according to the logs. Jack. |
01-02-2015, 03:41 PM | #4 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Sending 144MB in 37 seconds is reasonable performance. Is there any chance that you are running out of space on the device? I look forward to receiving the CC debug logs. |
|
01-02-2015, 03:46 PM | #5 |
Junior Member
Posts: 7
Karma: 10
Join Date: Mar 2009
Device: Sony PSP
|
I agree that 144MB in 37 seconds is reasonable. As for filling the device, I have 1.70 GB free according to the storage meter. That should be fine for a 252MB book.
I posted the CC debug logs as attachments to the forum thread in error instead of mailing them to you. That mistake has been corrected. Sorry about that! Jack. |
Advert | |
|
01-02-2015, 03:52 PM | #6 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Sorry, I wasn't clear. Those are calibre debug logs, which I need. I also need the CC debug log, which you send from CC. Go to CC's settings, scroll to the bottom, and choose "Send a debug log to multipie".
|
01-02-2015, 03:57 PM | #7 |
Junior Member
Posts: 7
Karma: 10
Join Date: Mar 2009
Device: Sony PSP
|
Ah, it's a new device and I'm not using it for email yet so I had to setup email. I removed the multipie address and sent the 438k-or-so message on its way!
Jack. |
01-03-2015, 06:13 AM | #8 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I have looked through the logs and, unfortunately, nothing jumps out.
Some things I can say:
Question: can you transfer the failing book using the content server? it uses different networking code both in calibre and in CC. |
|
01-03-2015, 08:25 PM | #9 |
Junior Member
Posts: 7
Karma: 10
Join Date: Mar 2009
Device: Sony PSP
|
Tried the wireless transfer again, and couldn't back-arrow out while the "Syncing with Calibre..." window was up. Waited a long time (didn't check) and it eventually disappeared and was replaced with the connection error box I've mentioned before. Hit OK, then hit back arrow twice, then restarted the app, and was able to connect again. Having a cancel button on the "Syncing with Calibre..." window would be nice.
Transfer with the content server was unsuccessful. Some interesting output on the calibre xterm, though: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited timed out Traceback (most recent call last): File "site-packages/calibre/gui2/device.py", line 87, in run File "site-packages/calibre/gui2/device.py", line 584, in _upload_books File "site-packages/calibre/devices/smart_device_app/driver.py", line 50, in _synchronizer File "site-packages/calibre/devices/smart_device_app/driver.py", line 1445, in upload_books File "site-packages/calibre/devices/smart_device_app/driver.py", line 683, in _put_file File "site-packages/calibre/devices/smart_device_app/driver.py", line 574, in _send_byte_string timeout: timed out Syntax Error: Couldn't find trailer dictionary Syntax Error: Couldn't find trailer dictionary Syntax Error: Couldn't read xref table pdfinfo errored out with return code: 1 Traceback (most recent call last): File "site-packages/calibre/customize/ui.py", line 349, in get_file_type_metadata File "site-packages/calibre/customize/builtins.py", line 325, in get_metadata File "site-packages/calibre/ebooks/metadata/pdf.py", line 101, in get_metadata ValueError: Could not read info dict from PDF Traceback (most recent call last): File "site-packages/calibre/devices/smart_device_app/driver.py", line 612, in _call_client File "site-packages/calibre/devices/smart_device_app/driver.py", line 654, in _receive_from_client ControlError: Device responded with incorrect information Not sure what that means. Jack. |
01-04-2015, 02:12 AM | #10 | |||||
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
It is good that connections worked again without power-cycling your device. That means that the OS (Android) recovered all the resources when CC died and cleaned up after itself, exactly as it is supposed to do. Quote:
Note: the content server logs are available in Preferences / Sharing over the net. Quote:
Quote:
Quote:
|
|||||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sending books to Kindle | ErikaGC | Library Management | 6 | 07-19-2012 06:52 PM |
Sending books to Kindle 4 | simonb | Calibre | 5 | 06-16-2012 10:44 AM |
Sending books to Kindle 4 | simonb | Amazon Kindle | 5 | 06-16-2012 10:16 AM |
Sending books to Kindle | ErikaGC | Calibre | 0 | 09-15-2011 09:18 AM |
Sending books wirelessly to kindle. | mug2k | Calibre | 2 | 10-04-2010 11:29 AM |