Your platform will be unavailable on the 13th of November 2024 from 9am to 12pm (Paris time) for maintenance operations

    •  
      request #37926 Tuleap Functions admin page can lead to error
    Infos
    #37926
    Manuel Vacelet (vaceletm)
    2024-05-17 14:19
    2024-05-02 16:08
    39537
    Details
    Tuleap Functions admin page can lead to error

    When the table start to be loaded by large json payload the tracker admin page of all functions is no longer available (internal server error).

    The corresponding error is:

    SQLSTATE[HY001]: Memory allocation error: 1038 Out of sort memory, consider increasing server sort buffer size
    /usr/share/tuleap/src/vendor/paragonie/easydb/src/EasyDB.php:1005, 
    /usr/share/tuleap/src/vendor/paragonie/easydb/src/EasyDB.php:948,
    /usr/share/tuleap/plugins/tracker_functions/include/TrackerFunctions/Logs/FunctionLogDao.php:76, 
    /usr/share/tuleap/plugins/tracker_functions/include/TrackerFunctions/Administration/AdministrationController.php:92, 
    /usr/share/tuleap/src/common/Request/FrontRouter.php:251, 
    /usr/share/tuleap/src/common/Request/FrontRouter.php:109, 
    /usr/share/tuleap/src/www/index.php:50
    

    It seems that it might related to some MySQL versions, some suggests to tweak sort_buffer_size.

    However it might be easier to split the query to avoid fetching the two heavy columns source_payload_json and generated_payload_json for all records (not needed when displaying the list) and to only fetch them when one line is requested.

    Tuleap Functions
    15.8
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Empty
    Closed
    2024-05-17
    Attachments
    Empty
    References

    Follow-ups

    User avatar

    and FTR, I ran the query manually with SET sort_buffer_size = 256000000; and it works. But that's a ugly fix IMHO

    User avatar

    I suspect that the problem happens despite the index and the fact we don't sort on the large columns because as the table is quite small (47 rows and most of them in the impacted tracker) MySQL decide to load the whole table.