Assistance with SQL error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 2TrakR
    New Member
    • Feb 2018
    • 6
    • 5.3.x

    Assistance with SQL error

    Randomly getting the following SQL error. Different users. I'm having difficulty determining "what" is wrong. I believe it is indicating a thumbnail image is the cause, but if so, I can't determine which image is at fault so it can be corrected.

    Any suggestions? TIA

    Code:
    Database error in vBulletin 5.4.2:
    
                Invalid SQL:
    
                    SELECT f.*, fdr.resize_type, fdr.resize_filesize, fdr.resize_dateline, fdr.resize_width,
                        fdr.resize_height, fdr.resize_filedata, fdr.reload
                    FROM filedata AS f
                    LEFT JOIN filedataresize AS fdr ON (fdr.filedataid = f.filedataid AND fdr.resize_type = 'thumb')
                    WHERE f.filedataid IN (143, 83, 85, 88, 87, 84, 86, 144, 145, 146, 93, 90, 89, 92, 91, 95, 94, 147, 148, 96, 149, 150, 151, 98, 97, 152, 99, 153, 154, 102, 100, 101, 156, 155, 106, 159, 157, 158, 103, 104, 160, 110, 161, 107, 111, 105, 108, 109, 115, 116, 113, 112, 162, 114, 118, 117, 163, 121, 120, 119, 164, 122, 126, 125, 127, 123, 130, 124, 134, 129, 128, 165, 166, 131, 132, 133, 167, 140, 168, 136, 135, 137, 142, 139, 138, 169, 170, 141, 171, 172, 173, 174, 175, 176, 177, 180, 178, 179, 181, 182, 183, 184, 185, 186, 187, 189, 188, 190, 191, 194, 193, 192, 195, 196, 197, 198, 199, 200, 201, 202, 204, 203, 205, 206, 207, 208, 209, 211, 210, 212, 213, 214, 215, 217, 216, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 291, 290, 292, 294, 293, 295, 296, 297, 298, 299, 300, 301, 302, 304, 303, 305, 306, 307, 310, 309, 308, 311, 313, 312, 314, 315, 316, 317, 318, 319, 321, 320, 322, 323, 324, 325, 326, 327, 328, 330, 332, 331, 333, 329, 334, 335, 336, 337, 338, 340, 339, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 352, 351, 353, 354, 355, 356, 360, 357, 359, 358, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 376, 375, 374, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 391, 388, 390, 389, 392, 393, 394, 395, 396, 397, 398, 401, 400, 399, 402, 403, 404, 406, 405, 407, 408, 409, 410, 411, 413, 412, 414, 415, 417, 416, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 436, 434, 435, 437, 438, 439, 440, 442, 441, 443, 444, 445, 446, 448, 447, 449, 450, 451, 452, 453, 454, 455, 456, 458, 457, 459, 461, 460, 462, 463, 464, 466, 465, 467, 468, 471, 469, 470, 473, 472, 474, 475, 476, 477, 478, 480, 479, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 495, 494, 496, 497, 498, 500, 499, 501, 502, 503, 504, 506, 507, 508, 505, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 522, 521, 523, 524, 525, 526, 527, 528, 529, 530, 532, 531, 533, 534, 536, 535, 537, 539, 538, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 559, 558, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 572, 571, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 592, 591, 594, 593, 595, 596, 598, 597, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 625, 624, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 640, 639, 641, 642, 643, 644, 645, 646, 647, 648, 650, 649, 651, 869, 870, 871, 895, 896, 897, 913, 899, 900, 901, 902, 903, 904, 908, 909, 910)
    /**getFiledataWithThumb**/;
    
                MySQL Error   : 
                Error Number  : 0
                Request Date  : Thursday, August 9th 2018 @ 01:44:08 PM
                Error Date    : Thursday, August 9th 2018 @ 01:44:09 PM
                Script        : [URL]http://forum.gldsmc.com/forum/ride-files/michigan-lp/page2[/URL]
                Referrer      : [URL]http://forum.gldsmc.com/forum/ride-files/michigan-lp[/URL]
                IP Address    : [user IP]
                Username      : [user]
                Classname     : vB_Database_MySQLi
                MySQL Version : 
    
    
    Stack Trace:
    #0 vB_Database->getErrorData() called in [path]/vb/database.php on line 1188
    #1 vB_Database->halt() called in [path]/vb/database/mysqli.php on line 201
    #2 vB_Database_MySQLi->execute_query() called in [path]/vb/database.php on line 557
    #3 vB_Database->query_read() called in [path]/vb/db/result.php on line 126
    #4 vB_dB_Result->rewind() called in [path]/vb/db/result.php on line 63
    #5 vB_dB_Result->__construct() called in [path]/packages/vbforum/db/mysql/querydefs.php on line 3895
    #6 vBForum_dB_MYSQL_QueryDefs->getFiledataWithThumb() called in [path]/vb/db/query/method.php on line 175
    #7 vB_dB_Query_Method->execSQL() called in [path]/vb/db/assertor.php on line 304
    #8 vB_dB_Assertor->assertQuery() called in [path]/vb/library/node.php on line 1791
    #9 vB_Library_Node->fetchNodeAttachments() called in [path]/vb/library/node.php on line 1932
    #10 vB_Library_Node->addFullContentInfo() called in [path]/vb/library/node.php on line 1411
    #11 vB_Library_Node->getFullContentforNodes() called in [path]/vb/api/search.php on line 399
    #12 vB_Api_Search->getMoreResults() called in [path]/vb/api/search.php on line 226
    #13 vB_Api_Search->getInitialResults() called in  on line 
    #14 call_user_func_array() called in [path]/vb/api/wrapper.php on line 199
    #15 vB_Api_Wrapper->__call() called in  on line 
    #16 vB_Api_Wrapper->getInitialResults() called in  on line 
    #17 call_user_func_array() called in /home/gldsmc5/public_html/forum/includes/api/interface/collapsed.php on line 101
    #18 Api_Interface_Collapsed->callApi() called in /home/gldsmc5/public_html/forum/includes/vb5/template/runtime.php on line 989
    #19 vB5_Template_Runtime::parseDataWithErrors() called in /home/gldsmc5/public_html/forum/includes/vb5/template.php(322) : eval()'d code on line 824
    #20 eval() called in /home/gldsmc5/public_html/forum/includes/vb5/template.php on line 322
    #21 vB5_Template->render() called in /home/gldsmc5/public_html/forum/includes/vb5/template/cache.php on line 134
    #22 vB5_Template_Cache->replacePlaceholders() called in /home/gldsmc5/public_html/forum/includes/vb5/template.php on line 344
    #23 vB5_Template->render() called in /home/gldsmc5/public_html/forum/includes/vb5/template/cache.php on line 134
    #24 vB5_Template_Cache->replacePlaceholders() called in /home/gldsmc5/public_html/forum/includes/vb5/template.php on line 344
    #25 vB5_Template->render() called in /home/gldsmc5/public_html/forum/includes/vb5/template/cache.php on line 134
    #26 vB5_Template_Cache->replacePlaceholders() called in /home/gldsmc5/public_html/forum/includes/vb5/template.php on line 344
    #27 vB5_Template->render() called in /home/gldsmc5/public_html/forum/includes/vb5/template/cache.php on line 134
    #28 vB5_Template_Cache->replacePlaceholders() called in /home/gldsmc5/public_html/forum/includes/vb5/template.php on line 344
    #29 vB5_Template->render() called in /home/gldsmc5/public_html/forum/includes/vb5/frontend/controller/page.php on line 259
    #30 vB5_Frontend_Controller_Page->index() called in  on line 
    #31 call_user_func_array() called in /home/gldsmc5/public_html/forum/index.php on line 74
  • 2TrakR
    New Member
    • Feb 2018
    • 6
    • 5.3.x

    #2
    PHP 5.6.37
    VB 5.4.2
    SQL 10.2.16-MariaDB
    No Add-ons

    Comment

    • Wayne Luke
      vBulletin Technical Support Lead
      • Aug 2000
      • 73976

      #3
      No error code is provided in that error. What were the exact steps to recreate the issue?

      Does it still happen?
      Translations provided by Google.

      Wayne Luke
      The Rabid Badger - a vBulletin Cloud demonstration site.
      vBulletin 5 API

      Comment

      • 2TrakR
        New Member
        • Feb 2018
        • 6
        • 5.3.x

        #4
        That error was being emailed to me from our server. I have not replicated the error, but have been seeing it over the last two weeks. Appears to be when users browse a particular board/thread, but again, I have not been able to replicate it from my account.
        I have 50+ instances of the error.
        After about 10 of those errors, I will be notified (by the server) that MySQL is down, then it will come back a few minutes later.

        My best guess, and it's only a guess which is why I'm posting here for suggestions, is that an attachment thumbnail is at fault. We allow a lot of non-standard file types for attachments.

        Today I have changed the attachments to be directory based instead of database-based and disabled thumbnails.
        No errors in the time since then, however the error has not been that frequent to say it's resolved.

        Is there somewhere else I should be looking for error logs/messages to track down the cause of the error?

        Comment

        • Wayne Luke
          vBulletin Technical Support Lead
          • Aug 2000
          • 73976

          #5
          Only images (and PDF under very specific server configurations) are thumbnailed. We consider GIF, PNG, JPG, JPEG, and possibly TIFF images to be images. All other image formats are not thumbnailed. There is a possibility that a thumbnail could be corrupted if you ran out of disk space while it was being written or MariaDB was shut down in the middle of a write. I don't know enough about MariaDB to know what its data protection protocols are.

          The query itself seems fine. When I run your query locally, I do not get any errors from it on a default vBulletin 5.4.3 database. I do get an empty result set but that is to be expected. There could be a server resource issue involved here. There isn't really enough information in the error message to help determine that though. You might look in your mysql.log file to see if it contains more information on the error. Your hosting provider can help with that. What happens if you run the same query in a tool like phpMyAdmin?

          Translations provided by Google.

          Wayne Luke
          The Rabid Badger - a vBulletin Cloud demonstration site.
          vBulletin 5 API

          Comment

          • 2TrakR
            New Member
            • Feb 2018
            • 6
            • 5.3.x

            #6
            Thank you for the suggestions, I will check further. I have not received the error in ~ 24 hours after disabling thumbnails and changing attachments to be directory based. We were around 1GB for the attachment (file) table, unsure if it were related, or if I've just lucked out for this short period of time.

            Comment

            Related Topics

            Collapse

            Working...