[dev] horde/scripts/alarms.php

Didi Rieder adrieder at sbox.tugraz.at
Wed Jul 9 15:33:09 UTC 2008


Quoting Didi Rieder <adrieder at sbox.tugraz.at>:

> Hi,
>
> I'm testing the alarms.php script (all cvs-HEAD), but unfortunately  
> I get the following Fatal error after a while:
>
> PHP Fatal error:  Call to undefined method MDB2_Error::execute() in  
> /usr/local/lib/php/Horde/Share/sql.php on line 164
>
> In the debug log I see that the script executes about 10000 sql  
> queries [Kronolith_Driver_sql::listEventsConditional()] before it  
> exits.
>
> 1.
> Does someone have an idea what could be the problem?
>
> 2.
> Is there a way to reduce the amount of queries?
> Or, would the number be reduced anyway after the script completes  
> its run successfully once?
>

Now since Jan commited  
http://article.gmane.org/gmane.comp.horde.cvs/65919 I got more  
information.

In the log I see 9877 entries of:

Jul 09 16:43:47 HORDE [debug] [kronolith]  
Kronolith_Driver_sql::listEventsConditional(): [....]

Then:

Jul 09 16:44:22 HORDE [debug] [kronolith] SQL Query by  
Prefs_sql::retrieve(): SELECT pref_scope, pref_name, pref_value FROM  
horde_prefs WHERE pref_uid = ? AND pref_scope = ?, values: [...]
Jul 09 16:44:22 HORDE [debug] [kronolith] SQL Query by  
Prefs_sql::retrieve(): SELECT pref_scope, pref_name, pref_value FROM  
horde_prefs WHERE pref_uid = ? AND pref_scope = ?, values: [...]
Jul 09 16:44:35 HORDE [error] [kronolith] MDB2 Error: unknown error:  
_doQuery: [Error message: Could not execute statement]
[Last executed query: PREPARE  
mdb2_statement_mysql_16383a2ae5dbc745f8ebc2910a979239b8c6a16575b FROM  
'SELECT * FROM kronolith_shares WHERE share_name = ?']
[Native code: 1461]
[Native message: Can't create more than max_prepared_stmt_count  
statements (current value: 16382)]
  [pid 5147 on line 173 of "/usr/local/lib/php/Horde/Share/sql.php"]

The same is then the case with nag:

Jul 09 16:44:37 HORDE [debug] [horde] SQL query by  
Horde_Alarm_sql::_exists(): SELECT 1 FROM horde_alarms WHERE alarm_id  
= ? AND [...]
Jul 09 16:44:37 HORDE [debug] [horde] SQL query by  
Horde_Alarm_sql::_update(): UPDATE horde_alarms set alarm_start = ?,  
alarm_end [...]

Then 9877 entries of:
Jul 09 16:44:39 HORDE [debug] [nag] SQL alarms list by riederd at mbox:  
table = nag_tasks; query = "SELECT * FROM nag_tasks WHERE [...]

Then
Jul 09 16:45:04 HORDE [error] [nag] MDB2 Error: unknown error:  
_doQuery: [Error message: Could not execute statement]
[Last executed query: PREPARE  
mdb2_statement_mysql_180702b1b4d7e1690d2978c1377b461e09b833d75ad FROM  
'SELECT * FROM nag_shares WHERE share_name = ?']
[Native code: 1461]
[Native message: Can't create more than max_prepared_stmt_count  
statements (current value: 16382)]
  [pid 5147 on line 173 of "/usr/local/lib/php_cvs_dev/Horde/Share/sql.php"]

16382 of prepared statements is a lot I think, but can this be changed?

The script now does not produce any output at the command line.

Didi

-- 
-------------------------
Didi Rieder
adrieder at sbox.tugraz.at
PGPKey ID: 3431D0B0
-------------------------



More information about the dev mailing list