• Resolved lordandy1984

    (@lordandy1984)


    Hi,
    i’ve a high load wordpress instance, and it seems the pretty link functions are even triggered for POST requests (e.g. /wp-admin/admin-ajax.php), which increases MySQL load.

    So with hundreds of parallel users every ajax call is resulting in additional pretty-link-calls on the database.

    It would be greate to have a filter hook to disable processing of POST requests at all, if only pretty link functions are used without any advanced tracking.

    I just added the following snippet in the function prli_redirect() in the file prli-main.php to disable processing of POST requests:

    if($_SERVER["REQUEST_METHOD"] != 'GET')
        return;

    Here are some Samples of the calls BEFORE this change:

    443355 Query  SHOW FULL COLUMNS FROM <code>wpexample_wfBlocks</code>
    443354 Query  select blockedTime, reason from wpexample_wfBlocks where IP='xxx' and (permanent=1 OR (blockedTime + '300' > unix_timestamp()))
    443355 Query  select blockedTime, reason from wpexample_wfBlocks where IP='xxx' and (permanent=1 OR (blockedTime + '300' > unix_timestamp()))
    443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443354 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'
    443355 Query  SELECT * FROM wpexample_prli_links WHERE slug='wp-admin/admin-ajax.php'

    https://ww.wp.xz.cn/plugins/pretty-link/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Disable POST processing’ is closed to new replies.