Getting this.
Code:An exception occurred: Mysqli statement execute error : Lock wait timeout exceeded; try restarting transaction in /home/xxx/public_html/library/Zend/Db/Statement/Mysqli.php on line 214 Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297 Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479 Zend_Db_Adapter_Abstract->query() in /home/xxx/public_html/rebuildlikes.php at line 39
Rebuilding like totals for users . . . done!
Rebuilding like totals for profile_posts . . . done!
Rebuilding serial cache for profile_posts . . . done!
Rebuilding like totals for posts . . . An unexpected database error occurred. Please try again later.
150717 0:02:17 InnoDB: ERROR: the age of the last checkpoint is 9433668,
InnoDB: which exceeds the log group capacity 9433498.
InnoDB: If you are using big BLOB or TEXT rows, you must set the
InnoDB: combined size of log files at least 10 times bigger than the
InnoDB: largest such row.
Then you can make a small modification to this script for your purposes. Add the red code:
Rich (BB code):$contentTypes = array( 'profile_post', 'post' ); echo "Rebuilding like totals for users . . . "; // REBUILD LIKE TOTALS FOR USERS $db->query(" UPDATE xf_user AS u SET u.like_count = ( SELECT COUNT(*) FROM xf_liked_content AS lc INNER JOIN xf_user_authenticate AS ua ON (ua.user_id = lc.like_user_id) WHERE lc.content_user_id = u.user_id AND lc.content_type IN (" . $db->quote($contentTypes) . ") ) ");
That will make it so the user counts only include likes for posts and profile posts.
Jake, I hate to be a pain but is there an easy way to modify this so that it only rebuilds likes for one user?
Getting this error when running the rebuild file
This is a test conversion of a vb3.8 forum with the thank you hack, 1.4 million posts around 300,000 likes
User total likes seem ok but no likes that i can find are showing in threads.
EDIT:
checking mysql error log shows
Thanks in advance
That's a server limit.
If you have root access to the server then you can edit the my.cnf file (usually at /etc/my.cnf) to increase the value of innodb_lock_wait_timeout. Increasing that limit should avoid this error. If you don't have root access then you need to ask your host or server person to do this.
For reference:
MySQL :: MySQL 5.0 Reference Manual :: 14.2.2 InnoDB Startup Options and System Variables
I have a 500.000 postings forum imported from vBulletin 3.8x and rebuild-scrips runs very, very long. I set the browser timeout to one hour, which wasn't enough. But the user thanks seems to be okay.
Question: Do I loose some important stuff when the script runs in a timeout after an hour? Or do I get something like an inconsistent database?
And: Can I run the script again later?
when i run the script, for example xenforo.com/rebuildlikes.php it just instantly reload xenforo.com and nothing happensMinor fix. I added inner joins so that nonexistent users are excluded. XenForo doesn't delete the like records when you delete a user, so I have now accounted for that.
can somebody please help me update this scrip for Xenforo 2.2?Minor fix. I added inner joins so that nonexistent users are excluded. XenForo doesn't delete the like records when you delete a user, so I have now accounted for that.
We use essential cookies to make this site work, and optional cookies to enhance your experience.