We've noticed that the server load is gradually increasing from month to month. The traffic (mainly robots) is not significant and it's hard to explain such a load on the mysql.
It is these requests that keep coming back to mysql :
| 1071 | kartcom_com | localhost | kartcom_com | Query | 4 | Sending data | SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2023/05/ffsa_ledenon_pre2023.jpg' | 0.000 |
| 1072 | kartcom_com | localhost | kartcom_com | Query | 3 | Sending data | SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2022/11/852_0994-k.jpg' | 0.000 |
| 1074 | kartcom_com | localhost | kartcom_com | Query | 3 | Sending data | SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2022/01/01517013_032.jpg' | 0.000 |
| 1076 | kartcom_com | localhost | kartcom_com | Query | 1 | Sending data | SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2023/06/kartcom_website_ksp_bondier-nelson_ksp_039_5350.jpg' | 0.000 |
| 1079 | kartcom_com | localhost | kartcom_com | Query | 1 | Sending data | SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2022/12/tdsa-2022.jpg' | 0.000 |
| 1080 | kartcom_com | localhost | kartcom_com | Query | 0 | Sending data | SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2023/01/ffsa_magny-cours-2022-1.jpg' | 0.000 |
| 1081 | kartcom_com | localhost | kartcom_com | Query | 0 | Sending data | SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2023/06/110_2008.jpg' | 0.000 |
| 1085 | kartcom_com | localhost | kartcom_com | Query | 4 | Sending data | SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2023/05/ffsa_ledenon_pre2023.jpg'
Note that resources are obviously listed in the database. There must be a problem with the module that manages this aspect, as it doesn't seem at all normal to use the database to load static resources.
The slowness is due to the Blog2Social plugin.
Here's the function that's causing performance problems: attachment_url_to_postid()
It is located on line 194 of the /wp-content/plugins/blog2social/includes/Meta.php file.
Do you have a fix for this?
Thanks for your feedback.
It is these requests that keep coming back to mysql :
| 1071 | kartcom_com | localhost | kartcom_com | Query | 4 | Sending data | SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2023/05/ffsa_ledenon_pre2023.jpg' | 0.000 |
| 1072 | kartcom_com | localhost | kartcom_com | Query | 3 | Sending data | SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2022/11/852_0994-k.jpg' | 0.000 |
| 1074 | kartcom_com | localhost | kartcom_com | Query | 3 | Sending data | SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2022/01/01517013_032.jpg' | 0.000 |
| 1076 | kartcom_com | localhost | kartcom_com | Query | 1 | Sending data | SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2023/06/kartcom_website_ksp_bondier-nelson_ksp_039_5350.jpg' | 0.000 |
| 1079 | kartcom_com | localhost | kartcom_com | Query | 1 | Sending data | SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2022/12/tdsa-2022.jpg' | 0.000 |
| 1080 | kartcom_com | localhost | kartcom_com | Query | 0 | Sending data | SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2023/01/ffsa_magny-cours-2022-1.jpg' | 0.000 |
| 1081 | kartcom_com | localhost | kartcom_com | Query | 0 | Sending data | SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2023/06/110_2008.jpg' | 0.000 |
| 1085 | kartcom_com | localhost | kartcom_com | Query | 4 | Sending data | SELECT post_id, meta_value FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2023/05/ffsa_ledenon_pre2023.jpg'
Note that resources are obviously listed in the database. There must be a problem with the module that manages this aspect, as it doesn't seem at all normal to use the database to load static resources.
The slowness is due to the Blog2Social plugin.
Here's the function that's causing performance problems: attachment_url_to_postid()
It is located on line 194 of the /wp-content/plugins/blog2social/includes/Meta.php file.
Do you have a fix for this?
Thanks for your feedback.
Comment