Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #1437677

    We’ve been informed that our server is working in limited mode due to the error:

    WordPress database error Got a packet bigger than ‘max_allowed_packet’ bytes for query UPDATE wp_options SET option_value = ‘a:235194:{s:66:\\”avia-head-scripts-32fc962d86c8c821d2897b306f60ddc0—60391e14520f6\\”;s:21:\\”error-generating-file\\”;s:66:\\”avia-head-scripts-32fc962d86c8c821d2897b306f60ddc0—60391e38b54f4\\”;s:21:\\”error-generating-file\\” […]

    I tried to solve the issue:

    Please go to Enfold theme options > Performance and enable “Show advanced options” then choose “Disable adding unique timestamp” option in “Unique timestamp of merged files”, disable “CSS and JS file merging and compression”, enable “Delete old CSS and JS files?” at the bottom and save theme options.

    Doesn’t work

    https://kriesi.at/documentation/enfold/optimization/#troubleshoot

    Doesn’t help too

    Tried these code snippets:

    function whv_update_option_aviaAsset_avia_head_scripts($value, $old_value, $option) {
         /*
         * Enfold Error from 4.7.0
         *
         * Enfold is writing in table options endless option_name aviaAsset_avia-head-scripts 'error-generating-file' ...
         * So web-side will slow down immense
         */
    
        if (in_array('error-generating-file', $value)) {
            return $old_value;
        }
        else {
            return $value;
        }
    }
    
    add_filter( 'pre_update_option_aviaAsset_avia-head-scripts', 'whv_update_option_aviaAsset_avia_head_scripts', 10,3 );
    
    function my_custom_merged_files_unique_id( $uniqid, $file_type, $data, $enqueued, $file_group_name, $conditions )
    {
        return '';
    }
    
    add_filter( 'avf_merged_files_unique_id', 'my_custom_merged_files_unique_id', 10, 6 );

    Don’t have any results.

    We are using the WP Rocket plugin. I’ve attempted to clear the cache consistently, tried all available combinations under Enfold’s ‘Show advanced options,’ disabled caching and other plugins, but none of these measures have resolved the issue.

    Additionally, I reached out to our hosting support to disable DB caching, and currently, there is no database object caching active.

    Could you please assist with this problem?

    #1437748

    Hey bmcinternet,

    Thank you for the inquiry.

    The error occurs due to the Enfold > Performance > File Compression settings. We recommend disabling the default compression options from the theme and use WP Rocket’s compression settings as an alternative.

    Best regards,
    Ismael

    #1437811

    Hello, Ismael

    No, current settings are “Disable – no file merging and compression” both for CSS and JS.

    Moreover, as I mentioned above, we have also tried all possible settings for Merging and Compression, and we still have the error.

    We also tried disabling WP Rocket and applied the PHP snippets mentioned above, but nothing has helped.

    • This reply was modified 1 month, 1 week ago by bmcinternet.
    #1437976

    Hi,

    Thank you for the update.

    The error should not occur when the Performance > File Compression settings are disabled because the theme will not generate, update, or retrieve the avia-head-scripts entry in the database. Please temporarily disable the compression options and the cache plugin, remove the snippets from the functions.php file, wait for a bit, make sure to purge the client and server cache, before testing it again.

    Best regards,
    Ismael

    #1437977

    Hi,

    UPDATE: If the avia-head-scripts entry is already generated in the database, try to delete it manually. Make sure to create a backup of your site and database before proceeding.

    Best regards,
    Ismael

    #1437984

    OK, I’ll try.
    Could you please tell me where I can find the avia_head_scripts in the WordPress database to delete them?

    #1438085

    Hi,
    Try using the search feature:
    Enfold_Support_5154.jpeg
    for my demo it was in the XX_options table, I recommend backing a full backup before deleting anything in the database.

    Best regards,
    Mike

    #1438255

    Hello

    Thank you, but there is no matches even if I search for “avia_head”.
    And we still have an error almost every minute

    #1438275

    Hi,

    To find the entry in database you can use the following SQL statement:

    
    SELECT * FROM wp_options WHERE option_name like '%avia-head-script%' 
    

    To remove all use:

    
    DELETE FROM wp_options WHERE option_name like '%avia-head-script%'
    

    Best regards,
    Günter

    #1438282

    Thank you for your reply, Günter, but the result is the same.

    MySQL returned an empty result set (i.e. zero rows). (Query took 0.0008 seconds.)
    SELECT * FROM wp_options WHERE option_name like ‘%avia-head-script%’;

    #1438328

    Hi,

    Do you have access to the configuration (my.cnf or my.ini) of your database? If not, try asking your hosting provider to increase the value of the max_allowed_packet from 16MB, which is the default, to 32MB. This might fix the issue that you’re having with the merged scripts.

    The error occurs because the theme is attempting to update the avia-head-script, but it exceeds the max_allowed_packet limit. If I am not mistaken, this should not happen if the compression option is disabled because the theme will neither update nor generate the avia-head-script. It’s quite odd that the issue still occurs even when the compression options are disabled.

    You can also add this code in the functions.php file to delete the database entry:

    <?php
    function ava_delete_head_scripts_option() {
        if ( get_option( 'aviaAsset_avia-head-scripts' ) !== false ) {
            delete_option( 'aviaAsset_avia-head-scripts' );
        }
    }
    
    add_action( 'init', 'ava_delete_head_scripts_option' );
    ?>
    

    Refresh the page a few times, then remove the code from the functions.php file.

    Best regards,
    Ismael

    #1438455

    Hello

    We don’t have an access to the configuration of our database service and we already asked our your hosting provider to increase the value of the max_allowed_packet. It is now at maximum allowed size for our account and the issue doesn’t gone.

    If I am not mistaken, this should not happen if the compression option is disabled because the theme will neither update nor generate the avia-head-script. It’s quite odd that the issue still occurs even when the compression options are disabled.

    We have been struggling with these errors for weeks, and I hope you understand that this situation shouldn’t last forever.

    You can also add this code in the functions.php file to delete the database entry:
    function ava_delete_head_scripts_option() {

    Done, doesn’t help

    • This reply was modified 1 month, 1 week ago by bmcinternet.
    • This reply was modified 1 month, 1 week ago by bmcinternet.
    #1438458

    Our MySQL variable max_allowed_packet is (25165824, 24 MB) now.
    And we still have an error:

    WordPress database error Got a packet bigger than ‘max_allowed_packet’ bytes for query UPDATE wp_options SET option_value = ‘a:235194:{s:66:\\”avia-head-scripts-32fc962d86c8c821d2897b306f60ddc0—60391e14520f6\\”;s:21:\\”error-generating-file\\”;s:66:\\”avia-head-scripts-32fc962d86c8c821d2897b306f60ddc0—60391e38b54f4\\”;s:21:\\”error-generating-file\\”

    • This reply was modified 1 month, 1 week ago by bmcinternet.
    #1438520

    Hi,

    We may need to access the site in order to check the issue further. Please set your installation to debug mode, provide the login details in the private field and make sure that the Appearance > Theme File Editor is active.

    // https://wordpress.org/plugins/error-log-monitor/
    // https://learn.wordpress.org/tutorial/debugging-in-wordpress/

    IMPORTANT: Please do not forget to create a site backup or restore point.

    Best regards,
    Ismael

    #1439059

    Ismael, Günter,

    The issue has been resolved, and it appears that the errors were generated by another site using the Enfold theme on our VPS. Therefore, we simply needed to apply your fixes to both sites simultaneously.

    Thank you for your support.

    #1439104

    Hi,
    Glad to hear that you have this sorted out, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘The “avia-head-scripts” error persists despite trying all recommendations’ is closed to new replies.