Performance Settings
Configure rate-limiting and request delays to optimize system performance.
Configure rate-limiting and request delays to prevent your system from being overloaded by incoming webhook updates from Square.
Overview
Performance settings help manage high-volume sync operations:
- Automatically pause webhooks when request threshold is exceeded
- Resume webhooks after backlog is processed
- Distribute load evenly during high-traffic periods
- Prevent server overload and timeouts
Settings Location
Go to SWS Pro > Settings > Performance to configure these options.
Rate-Limiting
Rate-limiting temporarily pauses Square webhooks when incoming requests exceed your configured threshold.
How It Works
- Requests counted within the time window
- When threshold is exceeded, webhook is paused
- System processes the backlog
- Webhook automatically re-enables when caught up
Settings
| Setting | Default | Description |
|---|---|---|
| Enable Rate-Limiting | Off | Toggle rate-limiting on/off |
| Rate Limit Threshold | 30 | Maximum requests allowed before triggering |
| Time Window | 60 seconds | Period during which threshold applies |
Example
With default settings (30 requests / 60 seconds):
- If Square sends 35 webhook updates in one minute
- After the 30th request, webhook pauses
- System processes the 30 queued updates
- Webhook resumes automatically
Request Delays
Request delays introduce a pause between processing webhook updates, distributing system load more evenly.
How It Works
- Webhook update received
- Delay applied before processing next update
- Prevents rapid consecutive requests
- Reduces peak resource usage
Settings
| Setting | Default | Description |
|---|---|---|
| Enable Request Delays | Off | Toggle delays on/off |
| Delay Length | 30 seconds | Time between processing requests |
When to Use These Settings
High-Volume Catalogs
If you have thousands of products that update frequently, enable rate-limiting to prevent overwhelming your server.
Shared Hosting
Shared hosting environments have limited resources. Use both rate-limiting and delays to stay within server limits.
During Bulk Operations
When performing bulk updates in Square (price changes, inventory updates), temporarily enable these settings to manage the flood of webhooks.
Limited Server Resources
If your server has limited CPU or memory, these settings help prevent timeouts and crashes during busy periods.
Recommended Configurations
Light Traffic
Leave settings disabled for fastest sync times.
Moderate Traffic
- Enable rate-limiting
- Threshold: 50 requests
- Time window: 60 seconds
Heavy Traffic
- Enable rate-limiting
- Threshold: 30 requests
- Time window: 60 seconds
- Enable request delays
- Delay: 15-30 seconds
Shared Hosting
- Enable rate-limiting
- Threshold: 20 requests
- Time window: 120 seconds
- Enable request delays
- Delay: 30-60 seconds
Troubleshooting
Sync seems slow
- Check if rate-limiting or delays are enabled
- Consider increasing threshold or reducing delay
- Monitor queue status for backlog
Server still overloading
- Lower the rate limit threshold
- Increase the delay length
- Consider upgrading hosting resources
- Set up server-side cron for reliable processing