Editing Templates Time Out

Whenever I go to edit a template, and then save it, it says that, "The server did not respond in time. Please try again later". Any idea what's wrong?

Edit: This looks like the error it's generating:

Stack Trace:
Code:
#0 /storage/content/75/101975/metaserve.net/public_html/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /storage/content/75/101975/metaserve.net/public_html/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /storage/content/75/101975/metaserve.net/public_html/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
#3 /storage/content/75/101975/metaserve.net/public_html/library/XenForo/DataWriter.php(1591): Zend_Db_Adapter_Abstract->insert('xf_template', Array)
#4 /storage/content/75/101975/metaserve.net/public_html/library/XenForo/DataWriter.php(1580): XenForo_DataWriter->_insert()
#5 /storage/content/75/101975/metaserve.net/public_html/library/XenForo/DataWriter.php(1381): XenForo_DataWriter->_save()
#6 /storage/content/75/101975/metaserve.net/public_html/library/XenForo/ControllerAdmin/Template.php(358): XenForo_DataWriter->save()
#7 /storage/content/75/101975/metaserve.net/public_html/library/XenForo/FrontController.php(310): XenForo_ControllerAdmin_Template->actionSaveMultiple()
#8 /storage/content/75/101975/metaserve.net/public_html/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /storage/content/75/101975/metaserve.net/public_html/admin.php(13): XenForo_FrontController->run()
#10 {main}

Request State:
Code:
array(3) {
  ["url"] => string(63) "http://www.metaserve.net/admin.php?templates/save-multiple.json"
  ["_GET"] => array(1) {
    ["templates/save-multiple_json"] => string(0) ""
  }
  ["_POST"] => array(13) {
    ["titleArray"] => array(2) {
      [211] => string(17) "message_user_info"
      [212] => string(21) "message_user_info.css"
    }
    ["styleidArray"] => array(2) {
      [211] => string(1) "0"
      [212] => string(1) "0"
    }
    ["templateArray"] => array(1) {
      [211] => string(4271) "<xen:require css="message_user_info.css" />
 
<div class="messageUserInfo" itemscope="itemscope" itemtype="http://data-vocabulary.org/Person">   
<div class="messageUserBlock">
    <xen:hook name="message_user_info_avatar" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
        <div class="avatarHolder">
            <span class="helper"></span>
            <xen:avatar user="$user" size="m" />
            <!-- slot: message_user_info_avatar -->
        </div>
    </xen:hook>
 
<xen:if is="!{$isQuickReply}">
    <xen:hook name="message_user_info_text" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
        <h3 class="userText">
            <xen:username user="$user" itemprop="name" rich="true" />
            <xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user}</xen:contentcheck></em></xen:if>
            <!-- slot: message_user_info_text -->
        </h3>
    </xen:hook>
 
<xen:if is="{$user.user_group_id} == 2">
<span class="userrank"><img src="URL_OF_RANK_TAG"></span>
</xen:if>
       
    <xen:if hascontent="true">
        <div class="extraUserInfo">
            <xen:contentcheck>
            <xen:hook name="message_user_info_extra" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
                <xen:if is="@messageShowRegisterDate">
                    <dl class="pairsInline">
                        <dt>{xen:phrase member_since}:</dt>
                        <dd>{xen:date $user.register_date}</dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowMessageCount">
                    <dl class="pairsInline">
                        <dt>{xen:phrase message_count}:</dt>
                        <dd><a href="{xen:link search/member, '', 'user_id={$user.user_id}'}" class="concealed">{xen:number $user.message_count}</a></dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowTotalLikes">
                    <dl class="pairsInline">
                        <dt>{xen:phrase likes_received}:</dt>
                        <dd>{xen:number $user.like_count}</dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowTrophyPoints">
                    <dl class="pairsInline">
                        <dt>{xen:phrase trophy_points}:</dt>
                        <dd><a href="{xen:link 'members/trophies', $user}" class="OverlayTrigger concealed">{xen:number $user.trophy_points}</a></dd>
                    </dl>
                </xen:if>
           
                <xen:if is="@messageShowGender AND {$user.gender}">
                    <dl class="pairsInline">
                        <dt>{xen:phrase gender}:</dt>
                        <dd itemprop="gender"><xen:if is="{$user.gender} == 'male'">{xen:phrase male}<xen:else />{xen:phrase female}</xen:if></dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowOccupation AND {$user.occupation}">
                    <dl class="pairsInline">
                        <dt>{xen:phrase occupation}:</dt>
                        <dd itemprop="role">{xen:string censor, $user.occupation}</dd>
                    </dl>
                </xen:if>
               
                <xen:if is="@messageShowLocation AND {$user.location}">
                    <dl class="pairsInline">
                        <dt>{xen:phrase location}:</dt>
                        <dd><a href="{xen:link 'misc/location-info', '', 'location={xen:string censor, $user.location, '-'}'}" target="_blank" rel="nofollow" itemprop="address" class="concealed">{xen:string censor, $user.location}</a></dd>
                    </dl>
                </xen:if>
           
                <xen:if is="@messageShowHomepage AND {$user.homepage}">
                    <dl class="pairsInline">
                        <dt>{xen:phrase home_page}:</dt>
                        <dd><a href="{xen:string censor, $user.homepage, '-'}" rel="nofollow" target="_blank" itemprop="url">{xen:string censor, $user.homepage}</a></dd>
                    </dl>
                </xen:if>
                           
            </xen:hook>           
            <xen:if is="@messageShowCustomFields AND {$user.customFields}">
            <xen:hook name="message_user_info_custom_fields" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
           
                <xen:foreach loop="$userFieldsInfo" key="$fieldId" value="$fieldInfo">
                    <xen:if is="{$fieldInfo.viewable_message}">
                        <xen:if hascontent="true">
                            <dl class="pairsInline userField_{$fieldId}">
                                <dt>{xen:helper userFieldTitle, $fieldId}:</dt>
                                <dd><xen:contentcheck>{xen:helper userFieldValue, $fieldInfo, $user, {$user.customFields.{$fieldId}}}</xen:contentcheck></dd>
                            </dl>
                        </xen:if>
                    </xen:if>
                </xen:foreach>
               
            </xen:hook>
            </xen:if>
            </xen:contentcheck>
        </div>
    </xen:if>
       
</xen:if>
 
    <span class="arrow"><span></span></span>
</div>
</div>"
    }
    ["addon_id"] => string(7) "XenForo"
    ["style_id"] => string(1) "7"
    ["template_id"] => string(3) "211"
    ["title_original"] => string(17) "message_user_info"
    ["_xfToken"] => string(53) "1,1348621315,54a7c2e46b4c2872493bc39b8855459a4d1541e1"
    ["includeTitles"] => array(5) {
      [0] => string(17) "message_user_info"
      [1] => string(21) "message_user_info.css"
      [2] => string(17) "message_user_info"
      [3] => string(21) "message_user_info.css"
      [4] => string(21) "message_user_info.css"
    }
    ["_TemplateEditorAjax"] => string(1) "1"
    ["_xfRequestUri"] => string(58) "/admin.php?templates/message_user_info.211/edit&style_id=7"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
There should be an actual error message above the stack trace that you posted. Please post that error message.
Here is what I found:

Code:
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Lock wait timeout exceeded; try restarting transaction - library/Zend/Db/Statement/Mysqli.php:214

Hope that helps :)
 
Ok. You've got a few timeout problems here. We can address the timeouts, but it's better to address the reason why the save is taking so long. How many styles do you have installed? XenForo takes on extra processing at save time to maximize performance at run time. If you have too many styles this can result in timeouts. The solution is usually to delete any excess styles.

Lock wait timeout exceeded

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

The server did not respond in time. Please try again later

This one means the save is taking longer than 30 seconds which is the timeout for AJAX requests in XenForo. You can try increasing this timeout:

http://xenforo.com/community/thread...-nodes-updating-usergroups.28811/#post-333911
 
Ok. You've got a few timeout problems here. We can address the timeouts, but it's better to address the reason why the save is taking so long. How many styles do you have installed? XenForo takes on extra processing at save time to maximize performance at run time. If you have too many styles this can result in timeouts. The solution is usually to delete any excess styles.



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



This one means the save is taking longer than 30 seconds which is the timeout for AJAX requests in XenForo. You can try increasing this timeout:

http://xenforo.com/community/thread...-nodes-updating-usergroups.28811/#post-333911
I have a good amount of styles. I have all the Flexile and Flexile Dark's, so that may be a problem. I have most of them disabled, but I guess that doesn't do anything but not allow users to use them :P

Thanks for the information. I will talk to my host, as I do not have root access.
 
Back
Top Bottom