• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 Template modifying problem

CyberAP

Well-known member
#1
I have 13 styles on my forum. XenForo seems working relatively fast, I used to delete templates or edit them with no problem at all. But in last 5 or 6 months I keep getting errors. If I try to edit or to revert some of the default templates (like 'message' or 'likes_summary') I get an error that server didn't respond in time. On the 3rd or 4th take it saves all the changes, but this doesn't work with deletion.
Is there any way of fixing this? Is that procedure of deleting default template such resource consuming?
 

Brogan

XenForo moderator
Staff member
#2
This is a known problem due to the templates being rebuilt.

The only solution currently is to reduce the number of styles.
 

CyberAP

Well-known member
#4
Unfortunately safe rebuild didn't help.

I get this error:

Mysqli statement execute error : Lock wait timeout exceeded; try restarting transaction
  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 661
  4. Zend_Db_Adapter_Abstract->delete() in XenForo/DataWriter.php at line 1784
  5. XenForo_DataWriter->_delete() in XenForo/DataWriter.php at line 1737
  6. XenForo_DataWriter->delete() in XenForo/ControllerAdmin/Template.php at line 187
  7. XenForo_ControllerAdmin_Template->actionDelete() in XenForo/FrontController.php at line 310
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  9. XenForo_FrontController->run() in admin.php at line 13
 

Jake Bunce

XenForo moderator
Staff member
#5
Mysqli statement execute error : Lock wait timeout exceeded; try restarting transaction
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:
http://dev.mysql.com/doc/refman/5.0/en/innodb-parameters.html#sysvar_innodb_lock_wait_timeout
 

CyberAP

Well-known member
#7
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:
http://dev.mysql.com/doc/refman/5.0/en/innodb-parameters.html#sysvar_innodb_lock_wait_timeout
Thanks for that tip, but I use shared hosting.
 

guiltar

Well-known member
#10
Not hard but solid amount of code. It changes current logic.
Now when you delete template, you find dependent templates and recompile them in one request.
Partial rebuild should first find dependant templates, mark them as needed to rebuild, then run multi-request rebuild in background.