6.0.0-beta1
7/9/25

[#6740] convert_datatree_shares_to_sql.php does not run to completion
Summary convert_datatree_shares_to_sql.php does not run to completion
Queue Kronolith
Queue Version 2.2-RC3
Type Bug
State Resolved
Priority 2. Medium
Owners chuck (at) horde (dot) org
Requester morgan (at) orst (dot) edu
Created 05/21/2008 (6258 days ago)
Due
Updated 05/23/2008 (6256 days ago)
Assigned 05/22/2008 (6257 days ago)
Resolved 05/23/2008 (6256 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/23/2008 02:45:58 AM Chuck Hagenbuch Comment #5
State ⇒ Resolved
Reply to this comment
Changes have been merged and ported to genie, ingo, mnemo, nag, turba, 
and whups. Thanks for testing!
05/22/2008 09:47:58 PM Chuck Hagenbuch Comment #4
State ⇒ Assigned
Reply to this comment
Ah, thanks. Sorry, I meant to test this but got distracted (baby, you 
know). I'll merge and port to other apps.
05/22/2008 09:36:52 PM morgan (at) orst (dot) edu Comment #3
New Attachment: convert_datatree_shares_to_sql.php.patch Download
Reply to this comment

[Show Quoted Text - 9 lines]
Close!  The $result variable was re-used so this version only 
processes 1 row and exits.  :)



See the attached patch for a simple fix.  It runs to completion for me.
05/22/2008 09:10:17 PM Chuck Hagenbuch Comment #2
State ⇒ Feedback
Assigned to Chuck Hagenbuch
Reply to this comment
Can you try rev 1.3 of the script from here:

http://cvs.horde.org/kronolith/scripts/upgrades/convert_datatree_shares_to_sql.php



I changed it not to load all of the datatree rows into memory and to 
free/unset some resources after each iteration, since my guess is that 
you're hitting memory issues (either just resource exhaustion or an 
actual memory limit). If this works for you we can merge the changes 
and copy the modifications to the other versions of this script in 
other apps.
05/21/2008 07:56:03 PM morgan (at) orst (dot) edu Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ convert_datatree_shares_to_sql.php does not run to completion
Queue ⇒ Kronolith
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
I have a very large datatree.  When I run 
convert_datatree_shares_to_sql.php in order to migrate to the new SQL 
Shares driver, the script runs for around 1 minute, then stops 
executing and exits.  No error messages are output on the console.  If 
I run the script again, it picks up where it left off and migrates 
more datatree entries.  I'm pretty sure the migration will finish if I 
run the script enough times...



I tried setting max_execution_time=0 in the CLI php.ini file, but 
there was no difference.



The last few lines of output (this time) are:



[  INFO  ] Migrating share data for share_id: 60516

[  INFO  ] DELETING datatree data for share_id: 60516

[  INFO  ] Migrating share data for share_id: 60519



I have also seen it end with "DELETING" as the last line.

Saved Queries