Can't edit or revert a template

GCSkye

Active member
I completely deleted everything under the message template and saved it. When I went to revert it, I got stuck with it loading. Eventually an error page displayed:

Server Error

Mysqli statement execute error : Lock wait timeout exceeded; try restarting transaction
  1. [*]Zend_Db_Statement_Mysqli->_execute()inZend/Db/Statement.phpat line292
    [*]Zend_Db_Statement->execute()inZend/Db/Adapter/Abstract.phpat line479
    [*]Zend_Db_Adapter_Abstract->query()inZend/Db/Adapter/Abstract.phpat line661
    [*]Zend_Db_Adapter_Abstract->delete()inXenForo/DataWriter.phpat line1690
    [*]XenForo_DataWriter->_delete()inXenForo/DataWriter.phpat line1644
    [*]XenForo_DataWriter->delete()inXenForo/ControllerAdmin/Template.phpat line225
    [*]XenForo_ControllerAdmin_Template->actionDelete()inXenForo/FrontController.phpat line310
    [*]XenForo_FrontController->dispatch()inXenForo/FrontController.phpat line132
    [*]XenForo_FrontController->run()in/home/----/public_html/xf-skins/admin.phpat line13
I've tried editing the template but also get stuck with it loading. All other templates on other skins, including the current style, seem to work just fine.
 
It's probably worked itself out by now, but if it hasn't, can you try to run this MySQL query? (Using something like phpMyAdmin)

SHOW FULL PROCESSLIST;
 
It's probably worked itself out by now, but if it hasn't, can you try to run this MySQL query? (Using something like phpMyAdmin)

SHOW FULL PROCESSLIST;

Hey Mike,

Hasn't worked itself out yet. Ran the command and got the following two tables:

Id User Hostdb Command Time State Info
1195634 ---- localhost database_name Sleep 22766 NULL
1245438 ---- localhost database_name Query 0 NULL SHOW FULL PROCESSLIST
Edit: I attempted to optimize the tables, it took about 5mins. After it was complete a few tables came up with the following msg_text Errors from these tables:
database_table.xf_template | optimize | error | Lock wait timeout exceeded; try restarting transac...
database_table.xf_template | optimize| status | Operation failed
database_table.xf_template_compiled | optimize | Error | Lock wait timeout exceeded; try restarting transac...
database_table.xf_template_compiled | optimize | error | Lock wait timeout exceeded; try restarting transac...
database_table.xf_template_compiled | optimize | status | Operation failed
database_table.xf_template_include | optimize | Error | Lock wait timeout exceeded; try restarting transac...
database_table.xf_template_include| optimize | error | Lock wait timeout exceeded; try restarting transac...
database_table.xf_template_include | optimize | status | Operation failed
database_table.xf_template_map | optimize | Error | Lock wait timeout exceeded; try restarting transac...
database_table.xf_template_map | optimize | error | Lock wait timeout exceeded; try restarting transac...
database_table.xf_template_map | optimize | status | Operation failed
database_table.xf_template_phrase | optimize | Error | Lock wait timeout exceeded; try restarting transac...
database_table.xf_template_phrase | optimize | error | Lock wait timeout exceeded; try restarting transac...
database_table.xf_template_phrase | optimize | status| Operation failed
database_table.xf_thread | optimize | Error | Lock wait timeout exceeded; try restarting transac..
 
Hi,

Actually, can you try:

SHOW FULL PROCESSLIST;

and

SHOW INNODB STATUS;

It might be easier to attach the output as txt files for formatting reasons.

There's no query that's running, but there's a connection that's been sitting there for a while. That must be holding on to a transaction.
 
SHOW INNODB STATUS;

Hey Mike,

I'll have to have the host run that, in the mean time maybe this will help? Its the XenForo Server Logs relating to the error:

Error Info​

Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Lock wait timeout exceeded; try restarting transaction - library/Zend/Db/Statement/Mysqli.php:214
Generated By: Simba, Friday at 8:47 PM
Stack Trace​
Code:
#0 /home/skye/public_html/xf-skins/library/Zend/Db/Statement.php(292): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/skye/public_html/xf-skins/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/skye/public_html/xf-skins/library/Zend/Db/Adapter/Abstract.php(632): Zend_Db_Adapter_Abstract->query('UPDATE `xf_temp...', Array)
#3 /home/skye/public_html/xf-skins/library/XenForo/DataWriter.php(1516): Zend_Db_Adapter_Abstract->update('xf_template', Array, 'template_id = 1...')
#4 /home/skye/public_html/xf-skins/library/XenForo/DataWriter.php(1485): XenForo_DataWriter->_update()
#5 /home/skye/public_html/xf-skins/library/XenForo/DataWriter.php(1291): XenForo_DataWriter->_save()
#6 /home/skye/public_html/xf-skins/library/XenForo/ControllerAdmin/Template.php(379): XenForo_DataWriter->save()
#7 /home/skye/public_html/xf-skins/library/XenForo/FrontController.php(310): XenForo_ControllerAdmin_Template->actionSaveMultiple()
#8 /home/skye/public_html/xf-skins/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /home/skye/public_html/xf-skins/admin.php(13): XenForo_FrontController->run()
#10 {main}
Request State​
PHP:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Lock wait timeout exceeded; try restarting transaction - library/Zend/Db/Statement/Mysqli.php:214
Generated By: Simba, Friday at 8:47 PM
Stack Trace
#0 /home/skye/public_html/xf-skins/library/Zend/Db/Statement.php(292): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/skye/public_html/xf-skins/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/skye/public_html/xf-skins/library/Zend/Db/Adapter/Abstract.php(632): Zend_Db_Adapter_Abstract->query('UPDATE `xf_temp...', Array)
#3 /home/skye/public_html/xf-skins/library/XenForo/DataWriter.php(1516): Zend_Db_Adapter_Abstract->update('xf_template', Array, 'template_id = 1...')
#4 /home/skye/public_html/xf-skins/library/XenForo/DataWriter.php(1485): XenForo_DataWriter->_update()
#5 /home/skye/public_html/xf-skins/library/XenForo/DataWriter.php(1291): XenForo_DataWriter->_save()
#6 /home/skye/public_html/xf-skins/library/XenForo/ControllerAdmin/Template.php(379): XenForo_DataWriter->save()
#7 /home/skye/public_html/xf-skins/library/XenForo/FrontController.php(310): XenForo_ControllerAdmin_Template->actionSaveMultiple()
#8 /home/skye/public_html/xf-skins/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /home/skye/public_html/xf-skins/admin.php(13): XenForo_FrontController->run()
#10 {main}
Request State
array(3) {
  ["url"] => string(66) "http://sleekvb.net/xf-skins/admin.php?templates/save-multiple.json"
  ["_GET"] => array(1) {
    ["templates/save-multiple_json"] => string(0) ""
  }
  ["_POST"] => array(12) {
    ["titleArray"] => array(2) {
      [1821] => string(7) "message"
      [1591] => string(11) "message.css"
    }
    ["styleidArray"] => array(2) {
      [1821] => string(2) "10"
      [1591] => string(1) "0"
    }
    ["templateArray"] => array(1) {
      [1821] => string(1512) "<xen:require css="message.css" />
<xen:require css="bb_code.css" />

<li id="{$messageId}" class="message {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_admin} OR {$message.is_moderator}', 'staff'}" data-author="{$message.username}">

    <xen:include template="message_user_info">
        <xen:map from="$message" to="$user" />
    </xen:include>

    <div class="messageInfo primaryContent">
        <xen:if is="{$message.isNew}"><strong class="newIndicator"><span></span>{xen:phrase new}</strong></xen:if>

        <xen:if hascontent="true">
            <ul class="messageNotices">
                <xen:contentcheck>
                    <xen:if is="{$message.isDeleted}">
                        <li class="deletedNotice">{xen:phrase this_message_has_been_removed_from_public_view}</li>
                    <xen:elseif is="{$message.isModerated}" />
                        <li class="moderatedNotice">{xen:phrase this_message_is_awaiting_moderator_approval_and_is_invisible_to_normal}</li>
                    </xen:if>
                </xen:contentcheck>
            </ul>
        </xen:if>

        <div class="messageContent">
            <article><blockquote class="messageText ugc baseHtml">{xen:raw $message.messageHtml}</blockquote></article>

            {xen:raw $messageContentAfterTemplate}
        </div>

        <xen:if is="{$visitor.content_show_signature} && {$message.signature}">
            <div class="baseHtml signature ugc"><aside>{xen:raw $message.signatureHtml}</aside></div>
        </xen:if>

        {xen:raw $messageAfterTemplate}

        <div id="likes-{$messageId}"><xen:if is="{$message.likes}"><xen:include template="likes_summary" /></xen:if></div>
    </div>

</li>"
    }
    ["addon_id"] => string(0) ""
    ["style_id"] => string(2) "10"
    ["template_id"] => string(4) "1821"
    ["title_original"] => string(7) "message"
    ["_xfToken"] => string(53) "1,1292618783,3c3f69b007731d8e489bcde829075d1b9245c667"
    ["includeTitles"] => array(10) {
      [0] => string(7) "message"
      [1] => string(11) "message.css"
      [2] => string(7) "message"
      [3] => string(11) "message.css"
      [4] => string(11) "message.css"
      [5] => string(11) "bb_code.css"
      [6] => string(17) "message_user_info"
      [7] => string(21) "message_user_info.css"
      [8] => string(13) "likes_summary"
      [9] => string(17) "likes_summary.css"
    }
    ["_TemplateEditorAjax"] => string(1) "1"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
SHOW INNODB STATUS;

===================================== 101229 20:0...

I was told that was the output.

I tried to revert the template today and was direct to these screens:

First run attempt:
Fatal error: Maximum execution time of 30 seconds exceeded in /home//public_html/xf-skins/library/XenForo/Template/Compiler.php on line 610

Second Run attempt:
Fatal error: Maximum execution time of 30 seconds exceeded in /home//public_html/xf-skins/library/XenForo/Template/Compiler/Statement/Abstract.php on line 7

If you are unsure what is causing this or why it would start in the first place, I can just download the template and import it. I'm sure this would fix the problem but I'd hope the data supplied here helps.

Edit: If I wait a day or so and go to edit the template, I can edit it. If I try to revert it, it gives the errors as mentioned. When attempting to edit after trying to revert, the same problems arrive as mentioned before.
 
Top Bottom