I have this all running on my local OSX machine. It works great.
I moved it to a staging server that is a Microsoft Server. When I run the jar file, the verbose report claims success. I see messages like:
Computing and saving similarity data.
Start computing recommendation and saving results.
Computing done. Waiting for data to be saved to the database. Records#: 14558
Done saving data
However, My view is empty and I confirmed that nothing was added to the recommender_similarity or the recommender_prediction database tables.
The recommeder admin panel page shows this process as a :success Users: 144. Items: 333. (Time spent: 0h0m10s):
I would appreciate any ideas, tips as to were to debug, any pointers at all.
Thanks!
Comments
Comment #1
maestrojed commentedHere is a theory. Not sure its correct or how to fix it but I thought I would share.
On OSX the tables are MyISAM which don't support transactions. On windows the tables are InnoDB and do support transactions. I see in the query log that this is set:
SET autocommit=0
So I think that means the queries are never committed?
Comment #2
maestrojed commentedIt seems my theory has proven true. The autocommit=0 parameter is keeping these sql commands from being executed. This happens when transactions are respected like they are in Innodb tables. As far as I can tell, this version of the module will not work with InnoDB tables.
MyISAM tables do not respect transactions and ignore the parameter autocommit=0 and therefore the module works.
Ideally the cause of the issue would be fixed. It would require changing that parameter. It seems this parameter is part of the .java script. Adjustments to the .java script require recompiling the jar and I am getting out of my comfort zone. I attempted to recompile it but there were broken third party references to mahout and such so I bailed. I am not a java developer.
I fixed this simply by changing my table's engine. Again, not a true fix but it does make this module work.
ALTER TABLE recommender_prediction ENGINE = MyISAM;
ALTER TABLE recommender_similarity ENGINE = MyISAM;
Everything is working for me now.
Comment #3
danithaca commentedCool. Thanks. I'll fix this problem in the Drupal7 release by allowing users to specify autocommit parameters. Thanks for the nice report.
Comment #4
danithaca commentedThe new release 7.x-6.x should have fixed the problem if you use the Java agent. You won't need Java if you use the PHP engine for small site. Releases 6.x is not supported anymore. See #2377503: Upgrade Recommender API helper modules to be compatible to 7.x-6.x if you use other helper modules.