statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
4.09k stars 534 forks source link

Caching of outpost response does not work in a load-balanced setup with different PHP versions #11135

Closed vintagesucks closed 3 days ago

vintagesucks commented 4 days ago

Bug description

Similar to #2186, having multiple servers with different PHP versions, e.g. 8.2.24 and 8.2.25 (or even 8.3), will cause the payload cache to be constantly invalidated, resulting in a lot of Too many requests to statamic.com. banners.

I realize that having different versions is not ideal, but this can happen when spinning up new instances or patching existing instances one after the other, and should not result in a non-dismissable banner for CP users.

Example payload diff:

grafik

How to reproduce

Click through the CP in a load-balanced Statamic Pro setup with different PHP patch versions.

Bildschirmfoto am 2024-11-18 um 16 05 59

Logs

No response

Environment

Application Name: [removed]
Laravel Version: 10.48.22
PHP Version: 8.2.13
Composer Version: 2.8.3
Environment: production
Debug Mode: OFF
URL: [removed]
Maintenance Mode: OFF

Cache
Config: CACHED
Events: CACHED
Routes: CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: redis
Database: mysql
Logs: stack / single
Mail: smtp
Queue: redis
Scout: meilisearch
Session: redis

Pulse
Enabled: ENABLED
Version: v1.2.4

Livewire
Livewire: v3.5.2

Sentry
Enabled: YES
Environment: production
Laravel SDK Version: 4.7.0
PHP SDK Version: 4.8.0
Release: 23331545d3f296dea34d15da8ce839862869bd5a
Sample Rate Errors: 100%
Sample Rate Performance Monitoring: 10%
Sample Rate Profiling: NOT SET
Send Default PII: DISABLED

Statamic
Addons: 5
Sites: 3 ([removed])
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.32.0 PRO

Statamic Addons
jacksleight/statamic-bard-texstyle: 3.3.0
mitydigital/sitemapamic: 3.2.0
statamic-rad-pack/meilisearch: 3.3.0
statamic/eloquent-driver: 4.15.2
statamic/seo-pro: 6.2.0

Statamic Eloquent Driver
Asset Containers: file
Assets: eloquent
Blueprints: file
Collection Trees: eloquent
Collections: file
Entries: eloquent
Forms: eloquent
Global Sets: file
Global Variables: file
Navigation Trees: eloquent
Navigations: file
Revisions: eloquent
Sites: file
Taxonomies: eloquent
Terms: eloquent
Tokens: file

Installation

Existing Laravel app

Additional details

See:

https://github.com/statamic/cms/blob/15128bc5603937b67eb52b40aa0e375b67272bbb/src/Licensing/Outpost.php#L160-L165

duncanmcclean commented 4 days ago

Out of curiosity, are these different PHP versions all in the same environement (eg. production, staging, testing) or different environements?

vintagesucks commented 4 days ago

Same environment (production)