I have a fairly large Maypole application that is experiencing
intermittent DBI errors. We've gotten these errors for a long time
and they've persisted through: upgrading mysql from 4.1 to 5.0, moving
the code and db server to higher end hardware, and upgrading the OS from
RedHat 9 to EL4. I'm on the very latest CDBI, DBI, DBD::mysql, etc.
Essentially, while moving through the interface, I'll occasionally get
an error like:
undef error - MegaPath::Model::Role_assignment can't SELECT id
FROM role_assignments
WHERE user_id = ?
: Can't use an undefined value as an ARRAY reference
at /usr/local/lib/perl5/site_perl/5.8.6/Class/DBI.pm line 1114.
I'll also often get:
fetchall_arrayref failed: fetch() without execute() [for Statement
"SELECT DISTINCT p.model_class FROM permissions AS p, role_assignments
AS r\n\t WHERE r.user_id = ?\n\t AND p.auth_role_id =
r.auth_role_id"]
at /usr/local/lib/perl5/site_perl/5.8.6/Maypole/Plugin/Authorization.pm
line 139, <GEN6> line 4.\n
undef error - DBD::mysql::st fetchrow_array failed: fetch() without
execute() [for Statement "SELECT hostname
FROM router
WHERE id=?
"] at /usr/local/lib/perl5/site_perl/5.8.6/DBIx/ContextualFetch.pm line
87, <GEN6> line 4.
at /usr/local/lib/perl5/site_perl/5.8.6/Maypole.pm line 130
Sometimes I'll also see a notice that the connection has been lost, but
usually not..
DBD::mysql::st execute failed: Lost connection to MySQL server during
query [for Statement "SELECT id, mss_config_id, address, netmask
The problems go away if I use httpd -X or set MaxClients = 1. In the
DBI trace log, I get messages like:
mysql_st_internal_execute
Binding parameters: SELECT p.id FROM permissions AS p, role_assignments
AS r
WHERE r.user_id = '8'
AND p.model_class = 'MegaPath::Model::FortiGate::Policy'
AND (p.method = 'list' OR p.method = '*')
AND p.auth_role_id = r.auth_role_id
LIMIT 1
<- dbd_st_execute returning imp_sth->row_num 0
<- execute= '0E0' at ContextualFetch.pm line 51
via /usr/local/lib/perl5/site_perl/5.8.6/DBIx/ContextualFetch.pm line 31
-> STORE for DBD::mysql::st
(DBIx::ContextualFetch::st=HASH(0x98a2244)~INNER 'Taint' 1)
I looked at the DBD.pm execute(), and it appears that it returns 0E0 on
a select if the variable $data is not set.. but I cannot even see where
it is supposed to be getting set.
I've been trying both with and without Apache::DBI, and it doesn't seem
to matter. The behaviour is easy to replicate, but non-deterministic.
If I just click on the links to my list views for my models quickly in
succession, I can trigger the error every time. Usually after it fails,
I have to restart apache, or I just continue to get the fetch() without
execute() error on every request. I'm going crazy here.. Am I the only
one having these sorts of issues?
Any suggestions would be highly appreciated ;)
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users