I've a problem that's just driving me up a wall - not only is it very intermittant, but I can't think of how to debug it properly.
I'm using CGI::SpeedyCGI for one of my larger scripts, and have been very happy with how it's working out.
Now, I've migrated part of the script to use Class::DBI instead of my custom DB code. Most of the time, it works wonderfully.
But sometimes, only sometimes, it blows up with the following error:
[Mon Oct 3 22:15:21 2005] script: MyApp::Sets can't SELECT id, id, se
+tnumber, setrev, name, theme, year, pcs, figs, picture, msrp, instruc
+tions, inventory
[Mon Oct 3 22:15:21 2005] script: FROM SETS
[Mon Oct 3 22:15:21 2005] script: WHERE ( ID = ? )
[Mon Oct 3 22:15:21 2005] script: : Not an ARRAY reference at /home/u
+ser/lib/modules/Class/DBI.pm line 1124.
[Mon Oct 3 22:15:21 2005] script: at /home/user/lib/modules/Class/DB
+I/AbstractSearch.pm line 31
How would I track this down? The problem doesn't seem to be in my code, and even when I added some debugging code to CDBI:AbstractSearch, everything looked right:
[Mon Oct 3 21:21:58 2005] script: phrase = $VAR1 = '( Theme = ? )';
[Mon Oct 3 21:21:58 2005] script:
[Mon Oct 3 21:21:58 2005] script: bind = $VAR1 = [
[Mon Oct 3 21:21:58 2005] script: 0
[Mon Oct 3 21:21:58 2005] script: ];
[Mon Oct 3 21:21:58 2005] script: MyApp::Sets can't SELECT id, id, se
+tnumber, setrev, name, theme, year, pcs, figs, picture, msrp, instruc
+tions, inventory
[Mon Oct 3 21:21:58 2005] script: FROM SETS
[Mon Oct 3 21:21:58 2005] script: WHERE ( Theme = ? )
[Mon Oct 3 21:21:58 2005] script: : Not an ARRAY reference at /home/u
+ser/lib/modules/Class/DBI.pm line 1124.
[Mon Oct 3 21:21:58 2005] script: at /home/user/lib/modules/Class/DB
+I/AbstractSearch.pm line 33
The problem goes away if I stop using SpeedyCGI, but the performance hit is too much at this point. (yes, I should migrate to mod_perl, one day).
Any ideas what I could try next to debug this?
Thanks!