XF 2.1 Prepared statement needs to be re-prepared src/XF/Db/AbstractStatement.php

hibiskus

Active member
What causes this error?
XenForo v2.1.10 Patch 2
SQL:
    XF\Db\Exception: MySQL query error [1615]: Prepared statement needs to be re-prepared src/XF/Db/AbstractStatement.php:228

    Generiert von: Largo2 3 September 2020 um 05:36

Stack-Trace

            -- XFDB=noForceAllWrite
            INSERT INTO xf_session
                (session_id, session_data, expiry_date)
            VALUES
                (?, ?, ?)
            ON DUPLICATE KEY UPDATE
                session_data = VALUES(session_data),
                expiry_date = VALUES(expiry_date)
        
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1615, 'HY000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1615, 'HY000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Session/DbStorage.php(57): XF\Db\AbstractAdapter->query('
            -- XFDB=noF...', Array)
#4 src/XF/Session/Session.php(215): XF\Session\DbStorage->writeSession('R81soyV8BheM6Jk...', Array, 14400, true)
#5 src/XF/Pub/App.php(447): XF\Session\Session->save()
#6 src/XF/App.php(2193): XF\Pub\App->complete(Object(XF\Http\Response))
#7 src/XF.php(391): XF\App->run()
#8 index.php(20): XF::runApp('XF\\Pub\\App')
#9 {main}

Status der Anfrage

array(4) {
  ["url"] => string(356) "/index.php?chat/update&users%5B1%5D=&users%5B2%5D=&channel=room&room_id=1&last_id%5B1%5D=14536&last_id%5B2%5D=10390&conv_id=0&conv_only=0&conv_items=&conv_last_active=1599045025&conv_last_update=1599045025&user_last_update=1599045025&is_chat_page=0&_xfRequestUri=%2F&_xfWithData=1&_xfToken=1599105224%2Cc5ff8eff78325cec92f6fe2ec2491bb0&_xfResponseType=json"
  ["referrer"] => string(21) "https://cryptoevo.de/"
  ["_GET"] => array(16) {
    ["chat/update"] => string(0) ""
    ["users"] => array(2) {
      [1] => string(0) ""
      [2] => string(0) ""
    }
    ["channel"] => string(4) "room"
    ["room_id"] => string(1) "1"
    ["last_id"] => array(2) {
      [1] => string(5) "14536"
      [2] => string(5) "10390"
    }
    ["conv_id"] => string(1) "0"
    ["conv_only"] => string(1) "0"
    ["conv_items"] => string(0) ""
    ["conv_last_active"] => string(10) "1599045025"
    ["conv_last_update"] => string(10) "1599045025"
    ["user_last_update"] => string(10) "1599045025"
    ["is_chat_page"] => string(1) "0"
    ["_xfRequestUri"] => string(1) "/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(43) "1599105224,c5ff8eff78325cec92f6fe2ec2491bb0"
    ["_xfResponseType"] => string(4) "json"
  }
  ["_POST"] => array(0) {
  }
}
 
Solution
This is a MySQL issue although it was more prevalent in older versions.

You may be able to resolve it by increasing the table_definition_cache value.

This can be changed in my.cnf or by your host.

Brogan

XenForo moderator
Staff member
This is a MySQL issue although it was more prevalent in older versions.

You may be able to resolve it by increasing the table_definition_cache value.

This can be changed in my.cnf or by your host.
 
Solution
Top