WP_User_Query($query_args); to many argument?

  • Unknown's avatar

    I have problem with a custom code for wordpress, WP_User_Query, This Query Doesn’t work It result in a 504 Gateway Time-out but if I shorten this query by remove one random parameter it works.

    Is there any limit how many arguments I can use.

    [mysqld]
    sql_mode=ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    bind-address = ::ffff:127.0.0.1
    local-infile=0
    innodb_strict_mode=OFF
    innodb_buffer_pool_size=200M
    max_allowed_packet=2048M
    net_read_timeout=6000
    net_write_timeout=6000

    PHP Version 8.4.4 max_execution_time3600 max_file_uploads 20 max_input_nesting_level64 max_input_time480 max_input_vars1000 max_multipart_body_parts-1 memory_limit2048M

    I have Tested it with different php versions , mysql 10.5.27-1.el9_5, WP 6.7.2-sv

    Array
    (
        [include] => 
        [fields] => all
        [meta_query] => Array
            (
                [relation] => AND
                [0] => Array
                    (
                        [0] => Array
                            (
                                [key] => grad_i_datum
                                [value] => 
                                [compare] => !=
                            )
    
                        [1] => Array
                            (
                                [key] => grad_ii_datum
                                [value] => 
                                [compare] => =
                            )
    
                        [2] => Array
                            (
                                [key] => grad_iii_datum
                                [value] => 
                                [compare] => =
                            )
    
                        [3] => Array
                            (
                                [key] => grad_iv_datum
                                [value] => 
                                [compare] => =
                            )
    
                        [4] => Array
                            (
                                [key] => grad_v_datum
                                [value] => 
                                [compare] => =
                            )
    
                        [5] => Array
                            (
                                [key] => grad_vi_datum
                                [value] => 
                                [compare] => =
                            )
    
                        [6] => Array
                            (
                                [key] => grad_vii_datum
                                [value] => 
                                [compare] => =
                            )
    
                        [7] => Array
                            (
                                [key] => grad_viii_datum
                                [value] => 
                                [compare] => =
                            )
    
                        [8] => Array
                            (
                                [key] => grad_ix_datum
                                [value] => 
                                [compare] => =
                            )
    
                    )
    
                [1] => Array
                    (
                        [relation] => OR
                        [0] => Array
                            (
                                [key] => slutanledning
                                [compare] => NOT EXISTS
                            )
    
                        [1] => Array
                            (
                                [key] => slutanledning
                                [value] => Array
                                    (
                                        [0] => In Memoria
                                        [1] => Avgått
                                    )
    
                                [compare] => NOT IN
                            )
    
                    )
    
            )
    
    )

    The blog I need help with is: (visible only to logged in users)

  • Hi there,

    Could you please share the URL of the WordPress.com site you are experiencing this issue on? I checked your account; however, there doesn’t appear to be any associated WordPress.com sites. If this is for a site hosted outside of WordPress.com, or is using WordPress.org, please be sure to post on the WordPress.org forums or contact your hosting provider.

    In your case, the timeout appears to be due to the SQL query structure that you currently have in combination with the dataset, which is causing it to exceed the allowed execution time provided by the server.

    Please keep in mind that on WordPress.com sites, the server environment values can’t be modified and are shown here: https://wordpress.com/support/php-environment/.

  • The topic ‘WP_User_Query($query_args); to many argument?’ is closed to new replies.