udx / wp-stateless

WP-Stateless is a WordPress plugin that uploads and serves your WordPress media from Google Cloud Storage.
https://stateless.udx.io
MIT License
261 stars 63 forks source link

DB optimization stuck in a loop #771

Open shon-everbridge opened 1 month ago

shon-everbridge commented 1 month ago

Hi Team,

I've deployed version 4.1.1 on our production site. However, the optimize data process seems to be running in an infinite loop.
It has been stuck at 2%. When I try to pause the process, it pauses momentarily, shows the percentage at 43%, then unpauses and reverts back to 2%.

This has been occuring for approximately two hours now. How can I stop the process? How should I proceed to fix this?

Any help at all would be greatly appreciated. Thanks.

Screenshot 2024-10-14 at 2 38 23 PM

shon-everbridge commented 1 month ago

Repeatedly pressing pause and resume seems to have allowed the process to "finish". But, the alerts are still there. Is there any way to ascertain if the optimization process completed successfully? Also, should the alerts remain indefinitely?

Screenshot 2024-10-14 at 3 21 06 PM

balexey88 commented 1 month ago

Hello @shon-everbridge ,

It seems like a caching issue. Could you please clear the CSS/JS or object cache on your site and also your browser cache and check again?

If this does not help please copy the info from Media / Stateless Setting / Status and post it here?

Thanks!

shon-everbridge commented 1 month ago

Hi @balexey88 ,

I've invalidated the site cache in google search console. I've cleared my browser cache locally, and I am still seeing the following alerts. I'll post the requested status info in a separate comment. Thanks for the help with this, by the way^^

Screenshot 2024-10-16 at 12 11 38 PM

shon-everbridge commented 1 month ago
### Server

Server architecture: Linux 6.1.100+ x86_64
Web server: Apache
MySQL version: 5.7.44-google-log
MySQL default engine: InnoDB
PHP Version: 8.1.29
PHP Memory Limit: 256M
PHP Max Input Vars: 1000
PHP Max Post Size: 15M
PHP Time Limit: 200
Max Upload Size: 15M
Allow URL-aware fopen Wrappers: Yes
Loaded Extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, ctype, curl, dom, fileinfo, filter, ftp, hash, iconv, json, mbstring, SPL, session, PDO, pdo_sqlite, standard, posix, Reflection, Phar, SimpleXML, tokenizer, xml, xmlreader, xmlwriter, mysqlnd, apache2handler, bcmath, exif, gd, imagick, intl, mysqli, sodium, zip, Zend OPcache

### WordPress

Version: 6.5.5
Multisite: No
Memory Limit: 40M
Total Attachments: 6968
Image Sizes (8): (150x150) thumbnail, (300x300) medium, (768x0) medium_large, (1024x1024) large, 1536x1536, 2048x2048, (0x0) small-img, (0x0) xl
Theme:  
Active Plugins: Advanced Custom Fields PRO 6.3.6, Advanced Editor Tools 5.9.2, Better Search Replace Pro 1.4.2, Broken Link Checker 2.3.0, Custom Permalinks 2.7.0, Disable Gutenberg 3.1.2, NDS Advanced Search 1.0.0, NDS Advanced Search - Blog 1.0.0, NDS Advanced Search - Resources 1.0.0, OneLogin SAML SSO 3.4.0, Redirection 5.5.0, SyntaxHighlighter Evolved 3.7.0, Wordfence Security 7.11.7, WP-Stateless 4.1.1, WP Crontrol 1.17.0, WP Mail SMTP 4.1.1, WP Migrate 2.6.10, Yoast Duplicate Post 4.5, Yoast SEO 23.4

### WP-Stateless

Version: 4.1.1
Database Version: 1.1
Mode: Stateless
File URL Replacement: Disabled
Supported File Types: jpg jpeg png gif pdf
Bucket: Set
Bucket Accessible: Yes
Service Account JSON: Set
Cache-Control: Default: public, max-age=36000, must-revalidate
Delete GCS File: Disable
Folder: %date_year/date_month%
Domain: Not set
Cache-Busting: Enable
Dynamic Image Support: Disable
Use Post Meta: Disable
Total Files: 6839
Total File Sizes: 25099
Compatibility Files: 0
Data Optimization: 20240423174109: Skipped, 20240219175240: Finished

### Google Cloud

Storage Class: MULTI_REGIONAL
Public Access Prevention: 
Access Control: Fine-grained
Versioning: Disabled
Soft Delete: Enabled
balexey88 commented 1 month ago

Hello @shon-everbridge,

Thank you for the provided info!

I can see that the messages changed, though they still persist. Previously there were 3 messages related to Data Optimization, now there is one related to Data Optimization and one related to the Media Library Sync. Also Status report shows that Data Optimization finished successfully, but the progress message is still there.

These messages rely on WP Transients, which are stored in WP Database by default, but can also be stored in the external caching service like Redis, Memcached, OPCache, etc. Do you use one any kind of object caching? If so, try to clear the Object Cache, this should help.

Please let if this helps.