6.0.0-alpha14
7/2/25

[#8283] 2006-04-18_add_creator_and_assignee_fields.php does not run to completion
Summary 2006-04-18_add_creator_and_assignee_fields.php does not run to completion
Queue Nag
Queue Version 2.3.2
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester karsten.konrad (at) uni-graz (dot) at
Created 05/15/2009 (5892 days ago)
Due
Updated 05/31/2009 (5876 days ago)
Assigned 05/15/2009 (5892 days ago)
Resolved 05/31/2009 (5876 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/31/2009 12:33:21 PM Jan Schneider State ⇒ Not A Bug
 
05/18/2009 03:23:08 PM Jan Schneider Comment #4 Reply to this comment
Horde opens just a single connection to the database server. If this 
doesn't work, then your PHP must be badly broken. You can try to 
workaround this by enable persistent connections in the DB 
configuration, at least while you run the script.
05/18/2009 01:07:54 PM karsten (dot) konrad (at) uni-graz (dot) at Comment #3 Reply to this comment
The Script 
nag/scripts/upgrades/2006-04-18_add_creator_and_assignee_fields.php 
gets a list of all 22k shares from $nag_shares->listAllShares(); and 
then tries to get the actual tasks for each tasklist. $tasks = 
Nag::listTasks(null, null, null, $tasklist, 1); fails at the latest 
after 16382 calls (changed code to log into the horde.log file):



May 18 10:37:33 HORDE [emergency] [nag] The Tasks backend is not 
currently available: DB Error: connect failed [pid 16275 on line 79 of 
"/var/www/html/horde/nag/scripts/upgrades/2006-04-18_add_creator_and_assignee_fields.php"]



It appears to me that for some reason db conncections are not closed 
correctly at some point as the number of processed tasklists is 
dependant on the maximal number of allowed open connections on the 
mysql server side. Unfortunately MySQL versions below 5.1.17 do not 
allow more than 16k connections by design, so the script fails before 
all shrares are processed. (see: 
http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_max_connections)



I run the script with various sql settings in hope to get less 
connections, mainly $GLOBALS['conf']['sql']['phptype']=mysql/mysqli

$GLOBALS['conf']['sql']['phptype']=true/false



System is CentOS 5.3, MySQL 5.0.45, PHP 5.1.6, PEAR Modules shipped 
with Horde Webmail 1.2.3.


05/15/2009 02:28:27 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
I have no idea how this is supposed to be a Horde problem.
05/15/2009 09:52:54 AM karsten (dot) konrad (at) uni-graz (dot) at Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ 2006-04-18_add_creator_and_assignee_fields.php does not run to completion
Queue ⇒ Nag
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
I'm trying to upgrade horde webmail edition 1.0.8 to 1.2.3



/nag/scripts/upgrade/2006-04-18_add_creator_and_assignee_fields.php 
fails while storing task creators after being silently busy for a while:



PHP Warning:   
Nag_Driver::require_once(/var/www/html/horde/nag/lib/Driver/sql.php): 
failed to open stream: Too many open files in 
/var/www/html/horde/nag/lib/Driver.php on line 131

PHP Fatal error:  Nag_Driver::require_once(): Failed opening required 
'/var/www/html/horde/nag/lib/Driver/sql.php' 
(include_path='/var/www/html/horde/lib:/var/www/html/horde/lib/../pear') in 
/var/www/html/horde/nag/lib/Driver.php on line 131

<<<<

Storing task creators for johndoe ...

...



I tried to allow php to open more files with ulimit -n 64000, but the 
script wont process more than 1995 tasklists (~10%).


Saved Queries