I have a fairly large book (~300 pages) which I cannot successfully copy. Even with setting my server to TimeOut 1200s, It still can only get about 30 pages to copy before the server goes unresponsive. I'm assuming from looking at a few other threads that this may be something that will be fixed when this begins to use an API. Is that true? Otherwise, this is a fairly critical bug. I would think books over 30 pages would be common.

Comments

jshorb’s picture

An update to the newest unstable version fails completely (doesn't copy a single node of the book before returning a blank page).

jgraham’s picture

Status: Active » Postponed (maintainer needs more info)

jshorb

Are there any pertinent sections in your apache/php error log?
Can you provide the url where the process stops?

jshorb’s picture

jgraham:

There seems to be only one error in the php error log:

(32)Broken pipe: core_output_filter: writing data to the network

I updated to the dev version of both Book Manager and Book Clone and even with the API, I can't get more than a few pages to clone (about 7). It dies when using the API code with error:

An HTTP error 403 occurred. /path/batch?id=497&op=do

Sometimes this returns with a 500 error instead. (It returns 403 if you try to re-copy a book by browser back button; 500 if its the first time trying to copy a sub-tree). The main thing that takes forever is the initializing.

jshorb’s picture

This last time I tried to copy a smaller sub-tree, I simply got a php execution error:

PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /
path/includes/database.mysqli.inc on line 108, referer: http://www2.chemeddl.org/services/
chempaths/batch?op=start&id=499

I will try to up the execution time to see if this helps. This doesn't address the other error, though.

Thanks,
Justin

jshorb’s picture

Resetting the php execution time limit just before the error point (set_time_limit(30) on line 108 of includes/database.mysqli.inc) allows the initializing step to take quite a bit longer and it made it through the whole entire sub-tree!

My CCK fields do have a lot of data in them, so it's possible that the copying is just processor intensive (my cpu is <2Ghz). I think there may be a good place to create a time-out option in the Book Copy code, itself, so it's not a core-hack. Possibly a configuration option.

This may need to be another bug report, but now that this finishes correctly, I notice that book clone does not respect Book Manager's default "make book personal" option.

Thanks!
Justin

jshorb’s picture

Status: Postponed (maintainer needs more info) » Active

I'm just moving this out of "postponed" in case it's queued for a reply.

goron’s picture

It seems that the module should use the Batch API to make sure that a timeout is avoided.