Resource issues
-
Hello
I have noticed my websites using this plugin is causing CPU spikes.
When i disable the plugin, the CPU resources drop
Are you aware of this.
I have tested this on 2 different servers so far
-
Hi,
I’m not aware of it.
I could think of one possibility that causes such issue is by background routines to update product information.
Can you test removing the
%review%
or%rating%
tags inItem Format
unit option on the both of your units (Dashboard -> Amazon Auto Links -> Manage Units -> Edit) and the default (Dashboard -> Amazon Auto Links -> Settings -> Default)? If these are present, the plugin tries to fetch those data in the background.Let me know if that helps.
I think that may have helped a little bit. Anything else you can think of?
Not that I can think of.
It could be that PHP or MySQL errors are kept throwing somewhere. Are you comfortable with enabling the site debug mode? If so, add these lines in the
wp-config.php
file.define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true );
Then check
wp-content
directory to see ifdebug.log
file is created. If you see some relevant error log entries, I’d like to see those.After enabling the site debug mode, you’ll see the
Debug
tab in Dashboard -> Amazon Auto Links -> Tools. It will list performed HTTP requests and if you find duplicated requests in a short period of time like in one seconds, I’d like to see those log entries as well.Also, which version of Amazon Auto Links, PHP, MySQL and WordPress are you using? These can be found in Dashboard -> Tools -> Site Health.
OK I added the following..
define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true );
define( ‘SCRIPT_DEBUG’, true );
define( ‘WP_DEBUG_DISPLAY’, true );no debug.log is getting created
In the Debug tab i see this…
2020-10-14 22:16:10.2818 5f8778aa44a82 aal_filter_http_request_set_cache https://aaa.bbb/wp-admin/edit.php?post_type=amazon_auto_links&page=aal_settings&field_errors=1
HTTP_REQUEST: 429: Too Many Requests AAL_aec59b2fd876f047cb46707fbb452707 https://webservices.amazon.ca/paapi5/searchitemsVersion 5.5.1
Server architecture Linux 4.18.0 x86_64
Web server Apache/2
PHP version 7.3.23 (Supports 64bit values)
PHP SAPI fpm-fcgi
PHP max input variables 1000
PHP time limit 30
PHP memory limit 128M
PHP memory limit (only for admin screens) 256M
Max input time 60
Upload max filesize 64M
PHP post max size 64M
cURL version 7.72.0 OpenSSL/1.1.1c-fips
Is SUHOSIN installed? No
Is the Imagick library available? No
Are pretty permalinks supported? Yes
.htaccess rules Custom rules have been added to your .htaccess file.Server version 10.4.14-MariaDB
In the Debug tab i see this…
2020-10-14 22:16:10.2818 5f8778aa44a82 aal_filter_http_request_set_cache https://aaa.bbb/wp-admin/edit.php?post_type=amazon_auto_links&page=aal_settings&field_errors=1
HTTP_REQUEST: 429: Too Many Requests AAL_aec59b2fd876f047cb46707fbb452707 https://webservices.amazon.ca/paapi5/searchitemsDo you see many “429: Too Many Requests” in there or just one? If you see many of those, I’d like to see the time part of them to check how frequent they are.
And I’d like to know your WordPress version.
Also, the plugin custom tables should be up-to-date. Can you go to Dashboard -> Amazon Auto Links -> Help -> About -> Database Tables and post what it says? It contains table version numbers and I’d like to see those.
I still see only it twice
WP is Version 5.5.1
[aal_products]
name: wpho_aal_products
version: 1.4.0
size: 0.03 MB
columns: {
0: {
Field: object_id
Type: bigint(20) unsigned
Null: NO
Key: PRI
Default:
Extra: auto_increment
}
1: {
Field: product_id
Type: varchar(128)
Null: YES
Key: UNI
Default:
Extra:
}
2: {
Field: asin
Type: varchar(10)
Null: YES
Key:
Default:
Extra:
}
3: {
Field: asin_locale
Type: varchar(13)
Null: NO
Key:
Default:
Extra:
}
4: {
Field: locale
Type: varchar(4)
Null: YES
Key:
Default:
Extra:
}
5: {
Field: language
Type: varchar(10)
Null: YES
Key:
Default:
Extra:
}
6: {
Field: modified_time
Type: datetime
Null: NO
Key:
Default: 0000-00-00 00:00:00
Extra:
}
7: {
Field: expiration_time
Type: datetime
Null: NO
Key:
Default: 0000-00-00 00:00:00
Extra:
}
8: {
Field: title
Type: text
Null: YES
Key:
Default:
Extra:
}
9: {
Field: links
Type: text
Null: YES
Key:
Default:
Extra:
}
10: {
Field: rating
Type: tinyint(3) unsigned
Null: YES
Key:
Default:
Extra:
}
11: {
Field: rating_image_url
Type: text
Null: YES
Key:
Default:
Extra:
}
12: {
Field: rating_html
Type: blob
Null: YES
Key:
Default:
Extra:
}
13: {
Field: preferred_currency
Type: varchar(10)
Null: YES
Key:
Default:
Extra:
}
14: {
Field: currency
Type: varchar(10)
Null: YES
Key:
Default:
Extra:
}
15: {
Field: sales_rank
Type: bigint(20)
Null: YES
Key:
Default:
Extra:
}
16: {
Field: price
Type: bigint(20) unsigned
Null: YES
Key:
Default:
Extra:
}
17: {
Field: price_formatted
Type: tinytext
Null: YES
Key:
Default:
Extra:
}
18: {
Field: lowest_new_price
Type: bigint(20) unsigned
Null: YES
Key:
Default:
Extra:
}
19: {
Field: lowest_new_price_formatted
Type: tinytext
Null: YES
Key:
Default:
Extra:
}
20: {
Field: lowest_used_price
Type: bigint(20) unsigned
Null: YES
Key:
Default:
Extra:
}
21: {
Field: lowest_used_price_formatted
Type: tinytext
Null: YES
Key:
Default:
Extra:
}
22: {
Field: discounted_price
Type: bigint(20) unsigned
Null: YES
Key:
Default:
Extra:
}
23: {
Field: discounted_price_formatted
Type: tinytext
Null: YES
Key:
Default:
Extra:
}
24: {
Field: count_new
Type: bigint(20) unsigned
Null: YES
Key:
Default:
Extra:
}
25: {
Field: count_used
Type: bigint(20) unsigned
Null: YES
Key:
Default:
Extra:
}
26: {
Field: description
Type: mediumtext
Null: YES
Key:
Default:
Extra:
}
27: {
Field: images
Type: mediumtext
Null: YES
Key:
Default:
Extra:
}
28: {
Field: similar_products
Type: mediumtext
Null: YES
Key:
Default:
Extra:
}
29: {
Field: editorial_reviews
Type: mediumblob
Null: YES
Key:
Default:
Extra:
}
30: {
Field: customer_review_url
Type: text
Null: YES
Key:
Default:
Extra:
}
31: {
Field: customer_review_charset
Type: varchar(20)
Null: YES
Key:
Default:
Extra:
}
32: {
Field: customer_reviews
Type: mediumblob
Null: YES
Key:
Default:
Extra:
}
33: {
Field: number_of_reviews
Type: bigint(20) unsigned
Null: YES
Key:
Default:
Extra:
}
34: {
Field: categories
Type: text
Null: YES
Key:
Default:
Extra:
}
35: {
Field: features
Type: text
Null: YES
Key:
Default:
Extra:
}
36: {
Field: is_prime
Type: tinyint(1)
Null: YES
Key:
Default:
Extra:
}
37: {
Field: is_adult
Type: tinyint(1)
Null: YES
Key:
Default:
Extra:
}
38: {
Field: error
Type: varchar(800)
Null: YES
Key:
Default:
Extra:
}
39: {
Field: delivery_free_shipping
Type: tinyint(1)
Null: YES
Key:
Default:
Extra:
}
40: {
Field: delivery_fba
Type: tinyint(1)
Null: YES
Key:
Default:
Extra:
}
}[aal_request_cache]
name: wpho_aal_request_cache
version: 1.0.0
size: 1.53 MB
columns: {
0: {
Field: name
Type: varchar(191)
Null: NO
Key: PRI
Default:
Extra:
}
1: {
Field: request_uri
Type: text
Null: YES
Key:
Default:
Extra:
}
2: {
Field: type
Type: varchar(20)
Null: YES
Key:
Default:
Extra:
}
3: {
Field: charset
Type: varchar(20)
Null: YES
Key:
Default:
Extra:
}
4: {
Field: cache
Type: mediumblob
Null: YES
Key:
Default:
Extra:
}
5: {
Field: modified_time
Type: datetime
Null: NO
Key:
Default: 0000-00-00 00:00:00
Extra:
}
6: {
Field: expiration_time
Type: datetime
Null: NO
Key:
Default: 0000-00-00 00:00:00
Extra:
}
}[aal_tasks]
name: wpho_aal_tasks
version: 1.0.1
size: 0.03 MB
columns: {
0: {
Field: name
Type: varchar(191)
Null: NO
Key: PRI
Default:
Extra:
}
1: {
Field: action
Type: varchar(191)
Null: YES
Key:
Default:
Extra:
}
2: {
Field: arguments
Type: text
Null: YES
Key:
Default:
Extra:
}
3: {
Field: creation_time
Type: datetime
Null: NO
Key:
Default: 0000-00-00 00:00:00
Extra:
}
4: {
Field: next_run_time
Type: datetime
Null: NO
Key:
Default: 0000-00-00 00:00:00
Extra:
}
}Hmm, looks okay to me. Thanks for posing those information.
Can you test unchecking the unit option,
Now Retrieving Message
, underCommon Advanced
in the both the Default tab and all of your your unit editing pages? If this enabled, the plugin JavaScript tries to resume pending product data. This performs Ajax requests and might consume CPU usage. Once those pending elements are updated, it won’t happen however. So I don’t think it’s the case but it might.Or it could be that you are setting a short cache duration. Can you make the unit Cache Duration option longer than the current one? When caches expire, they will be renewed in the background and the process involves a certain number of HTTP requests which can consume some resources as well.
- The topic ‘Resource issues’ is closed to new replies.