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

Fixed Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Duplicate entry '385bd7c80...

Discussion in 'Resolved Bug Reports' started by Hornstar, May 4, 2014.

  1. Hornstar

    Hornstar Well-Known Member

    I've only just installed and done the import this week and I am getting this error in my server log:

    Code:
    Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Duplicate entry '385bd7c80cc5ef71de32faa65ad57e71' for key 'url_hash' - library/Zend/Db/Statement/Mysqli.php:214
    Generated By: Unknown Account, Today at 4:16 PM
    Stack Trace
    #0 /home/***/public_html/forums/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
    #1 /home/***/public_html/forums/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
    #2 /home/***/public_html/forums/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
    #3 /home/***/public_html/forums/library/XenForo/Model/ImageProxy.php(283): Zend_Db_Adapter_Abstract->insert('xf_image_proxy', Array)
    #4 /home/***/public_html/forums/library/XenForo/Model/ImageProxy.php(31): XenForo_Model_ImageProxy->_fetchAndCacheImage('https://lh4.goo...')
    #5 /home/***/public_html/forums/library/XenForo/ProxyOutput.php(197): XenForo_Model_ImageProxy->getImage('https://lh4.goo...')
    #6 /home/***/public_html/forums/library/XenForo/ProxyOutput.php(129): XenForo_ProxyOutput->_outputImage(false)
    #7 /home/***/public_html/forums/library/XenForo/ProxyOutput.php(341): XenForo_ProxyOutput->output()
    #8 /home/***/public_html/forums/proxy.php(12): XenForo_ProxyOutput::run()
    #9 {main}
    Request State
    array(3) {
    ["url"] => string(232) "http://www.***.net/forums/proxy.php?image=https%3A%2F%2Flh4.googleusercontent.com%2F-Ncmu0KT--JE%2FUAeBfCiUdTI%2FAAAAAAAANco%2FjtM6kg_plwk%2Fs912%2Fdont%252520have%252520gamelauncher.jpg&hash=0415f59d490157ad06adb374e0a92836"
    ["_GET"] => array(2) {
    ["image"] => string(122) "https://lh4.googleusercontent.com/-Ncmu0KT--JE/UAeBfCiUdTI/AAAAAAAANco/jtM6kg_plwk/s912/dont%2520have%2520gamelauncher.jpg"
    ["hash"] => string(32) "0415f59d490157ad06adb374e0a92836"
    }
    ["_POST"] => array(0) {
    }
    }
    
    
     
  2. Mike

    Mike XenForo Developer Staff Member

    Looks like a race condition, though it should generally be quite a small window -- this is the first I've heard it reported at least. In general, it's safe to ignore it (assuming it's really only happened once).
     
    Jake Bunce likes this.
  3. Hornstar

    Hornstar Well-Known Member

    Thanks. I'm going through the log now. Found some more.

    Code:
    Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Duplicate entry '8384b207b94592154f36a93ba31b46a5' for key 'url_hash' - library/Zend/Db/Statement/Mysqli.php:214
    Generated By: Unknown Account, Monday at 2:39 AM
    Stack Trace
    #0 /home/***/public_html/forums/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
    #1 /home/***/public_html/forums/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
    #2 /home/***/public_html/forums/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
    #3 /home/***/public_html/forums/library/XenForo/Model/ImageProxy.php(283): Zend_Db_Adapter_Abstract->insert('xf_image_proxy', Array)
    #4 /home/***/public_html/forums/library/XenForo/Model/ImageProxy.php(31): XenForo_Model_ImageProxy->_fetchAndCacheImage('http://i121.pho...')
    #5 /home/***/public_html/forums/library/XenForo/ProxyOutput.php(197): XenForo_Model_ImageProxy->getImage('http://i121.pho...')
    #6 /home/***/public_html/forums/library/XenForo/ProxyOutput.php(129): XenForo_ProxyOutput->_outputImage(false)
    #7 /home/***/public_html/forums/library/XenForo/ProxyOutput.php(341): XenForo_ProxyOutput->output()
    #8 /home/***/public_html/forums/proxy.php(12): XenForo_ProxyOutput::run()
    #9 {main}
    Request State
    array(3) {
    ["url"] => string(160) "http://www.***.net/forums/proxy.php?image=http%3A%2F%2Fi121.photobucket.com%2Falbums%2Fo222%2FSlugsnack%2F6-15.png&hash=51ab803369e48470c795b5189cda9395"
    ["_GET"] => array(2) {
    ["image"] => string(58) "http://i121.photobucket.com/albums/o222/Slugsnack/6-15.png"
    ["hash"] => string(32) "51ab803369e48470c795b5189cda9395"
    }
    ["_POST"] => array(0) {
    }
    }
    
    And
    image.jpg
     
  4. Mike

    Mike XenForo Developer Staff Member

    I'm quite surprised exactly how frequently that's happened for you, but regardless I have added a code to prevent it in the future.
     
    Hornstar likes this.

Share This Page