---
url: >-
  https://docs.corbitaltech.dev/products/feedback-flow/configuration/advanced-settings.md
---
# Advanced Settings

Configure Redis, caching, queue workers, and performance optimization settings.

## Overview

Advanced settings control the technical infrastructure of FeedbackFlow, including caching strategies, queue configuration, and performance optimizations.

::: warning Technical Knowledge Required
These settings require understanding of Laravel, Redis, and server administration. Incorrect configuration can cause application failures.
:::

## Accessing Advanced Settings

1. Navigate to **Settings → Advanced Optimization**
2. Review current configuration
3. Make changes carefully
4. Test after each change

![Advanced Settings](/products/feedback-flow/public/screenshots/advance-optimization.png)

## Redis Configuration

Redis dramatically improves performance for caching, sessions, and queue jobs.

### Redis Connection Settings

Configure Redis connection details:

| Setting            | Description               | Default         |
| ------------------ | ------------------------- | --------------- |
| **Enable Redis**   | Use Redis for cache/queue | Recommended     |
| **Redis Host**     | Redis server address      | `127.0.0.1`     |
| **Redis Port**     | Redis port number         | `6379`          |
| **Redis Password** | Redis auth password       | Empty (no auth) |
| **Redis Database** | Database number (0-15)    | `0`             |

### Test Redis Connection

Click **Test Redis Connection** to verify connectivity.

**Successful connection:**

```
✓ Redis connection successful
Server version: 6.2.6
Memory usage: 2.5 MB
```

**Failed connection:**

```
✗ Could not connect to Redis
Error: Connection refused
```

![Redis Test](/products/feedback-flow/public/screenshots/advance-optimization.png)

### Redis Use Cases

**Caching:**

* Configuration cache
* Route cache
* View cache
* Model cache (boards, feature requests)

**Sessions:**

* User session storage
* CSRF token storage

**Queues:**

* Email jobs
* Webhook delivery
* Spam detection processing

## Cache Configuration

### Cache Driver

Select cache storage backend:

**Options:**

* `redis` - Redis (recommended)
* `file` - File system
* `database` - Database table
* `memcached` - Memcached server

**Recommendation:** Use Redis for best performance.

### Model Cache Settings

FeedbackFlow caches database models for faster queries.

| Setting                | Description              | Default |
| ---------------------- | ------------------------ | ------- |
| **Enable Model Cache** | Cache Eloquent models    | Enabled |
| **Cache TTL**          | Time to live (minutes)   | 30      |
| **Cache Store**        | Which cache store to use | `redis` |

**Cached models:**

* Boards
* Feature requests
* Users
* Categories
* Statuses
* Tags

### Clear Cache

Buttons to clear different cache types:

* **Clear Application Cache** - Application data cache
* **Clear Configuration Cache** - Cached config files
* **Clear Route Cache** - Cached routes
* **Clear View Cache** - Compiled Blade views
* **Clear All Caches** - Everything

::: tip When to Clear Cache
Clear caches after:

* Updating `.env` file
* Changing configuration
* Deploying new code
* Debugging issues
  :::

## Queue Configuration

Configure background job processing.

### Queue Driver

Select queue backend:

**Options:**

* `redis` - Redis queues (recommended)
* `database` - Database table queues
* `sync` - Synchronous (no queue, not recommended)
* `sqs` - AWS SQS

**Recommendation:** Use Redis for reliability and performance.

### Queue Settings

| Setting              | Description                    | Default   |
| -------------------- | ------------------------------ | --------- |
| **Queue Connection** | Active queue driver            | `redis`   |
| **Default Queue**    | Queue name                     | `default` |
| **Max Tries**        | Retry attempts for failed jobs | `3`       |
| **Retry After**      | Seconds before retry           | `90`      |

### Queue Worker Status

View queue worker status:

**Running:**

```
✓ 2 queue workers running
Last processed job: 5 seconds ago
Jobs in queue: 12
```

**Not Running:**

```
✗ No queue workers detected
Warning: Emails and webhooks will not be sent
```

### Restart Queue Workers

Click **Restart Queue Workers** to reload workers after configuration changes.

```bash
# Manual restart via command line
sudo supervisorctl restart feedbackflow-worker:*
```

## Performance Optimization

### Database Query Optimization

| Setting                | Description             | Recommendation        |
| ---------------------- | ----------------------- | --------------------- |
| **Enable Query Cache** | Cache database queries  | Enabled               |
| **Eager Loading**      | Auto-load relationships | Enabled               |
| **Query Logging**      | Log slow queries        | Disabled (production) |

### Asset Optimization

| Setting               | Description        | Recommendation       |
| --------------------- | ------------------ | -------------------- |
| **Minify CSS**        | Compress CSS files | Enabled (production) |
| **Minify JavaScript** | Compress JS files  | Enabled (production) |
| **Enable CDN**        | Use CDN for assets | Optional             |

### Response Compression

| Setting               | Description                     | Recommendation |
| --------------------- | ------------------------------- | -------------- |
| **Enable Gzip**       | Compress HTTP responses         | Enabled        |
| **Compression Level** | 1-9 (higher = more compression) | 6              |

## Session Configuration

### Session Driver

Select session storage:

**Options:**

* `redis` - Redis (recommended)
* `file` - File system
* `database` - Database table
* `cookie` - Encrypted cookies

**Recommendation:** Use Redis for better performance.

### Session Settings

| Setting              | Description                     | Default |
| -------------------- | ------------------------------- | ------- |
| **Session Lifetime** | Minutes until expiration        | `120`   |
| **Expire on Close**  | End session when browser closes | `false` |
| **Encrypt**          | Encrypt session data            | `true`  |

## Horizon Dashboard (Queue Monitoring)

Laravel Horizon provides a dashboard for monitoring queue jobs.

### Enable Horizon

1. Toggle **Enable Horizon Dashboard**
2. Save changes
3. Access at `/admin/horizon`

**Horizon shows:**

* Real-time queue metrics
* Failed jobs
* Job throughput
* Worker processes

### Horizon Authentication

Horizon is restricted to admin users automatically.

## Broadcasting Configuration

For real-time features (if enabled).

### Broadcast Driver

**Options:**

* `pusher` - Pusher service
* `redis` - Redis with Laravel Echo
* `log` - Log only (testing)
* `null` - Disabled

### Pusher Settings

If using Pusher:

| Setting            | Required                     |
| ------------------ | ---------------------------- |
| **Pusher App ID**  | From Pusher dashboard        |
| **Pusher Key**     | Public key                   |
| **Pusher Secret**  | Secret key                   |
| **Pusher Cluster** | Server cluster (e.g., `us2`) |

## Logging Configuration

### Log Level

Control log verbosity:

**Options:**

* `debug` - Detailed debugging (development only)
* `info` - Informational messages
* `notice` - Normal but significant events
* `warning` - Warning messages
* `error` - Error messages only
* `critical` - Critical errors only

**Production:** Use `error` or `warning`
**Development:** Use `debug` or `info`

### Log Channel

Where logs are written:

**Options:**

* `stack` - Multiple channels (recommended)
* `single` - Single log file
* `daily` - Daily rotating log files
* `syslog` - System log
* `errorlog` - PHP error log

### View Logs

Access logs:

1. Navigate to **Admin → System Logs**
2. Filter by level, date, or search
3. View detailed error traces

## Database Optimization

### Connection Pooling

| Setting                    | Description                    | Default |
| -------------------------- | ------------------------------ | ------- |
| **Persistent Connections** | Reuse DB connections           | Enabled |
| **Connection Timeout**     | Seconds before timeout         | 60      |
| **Max Connections**        | Maximum concurrent connections | 100     |

### Query Timeout

Set maximum query execution time:

**Default:** 60 seconds
**Recommended:** 30 seconds for production

## Performance Monitoring

### Application Performance

View real-time metrics:

* Average response time
* Memory usage
* Database query count
* Cache hit ratio
* Queue job throughput

### Optimization Recommendations

System analyzes performance and suggests:

* Enable missing optimizations
* Increase cache TTL
* Add more queue workers
* Enable Redis if not active

## Troubleshooting

### Redis Connection Fails

**Check Redis is running:**

```bash
redis-cli ping
# Should return: PONG
```

**Check Redis configuration:**

```bash
redis-cli info
```

**Restart Redis:**

```bash
sudo systemctl restart redis
```

### Queue Workers Not Processing

**Check worker status:**

```bash
sudo supervisorctl status feedbackflow-worker
```

**View worker logs:**

```bash
tail -f storage/logs/worker.log
```

**Restart workers:**

```bash
sudo supervisorctl restart feedbackflow-worker:*
```

### Cache Not Working

**Clear all caches:**

```bash
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear
```

**Check permissions:**

```bash
chmod -R 775 storage/framework/cache
```

## Best Practices

### Production Settings

Recommended for production:

* **Cache Driver:** Redis
* **Session Driver:** Redis
* **Queue Driver:** Redis
* **Model Cache:** Enabled, 30 min TTL
* **Log Level:** `error`
* **Debug Mode:** Disabled (in General Settings)

### Development Settings

Recommended for development:

* **Cache Driver:** File or Redis
* **Queue Driver:** Redis or database
* **Log Level:** `debug`
* **Query Logging:** Enabled

### Regular Maintenance

**Weekly:**

* Check queue worker status
* Review error logs
* Monitor cache hit ratio

**Monthly:**

* Update Redis/dependencies
* Review performance metrics
* Optimize slow queries

## Next Steps

* [Createing Boards](/products/feedback-flow/configuration/advanced-settings) -New board create
* [Board Customization](/products/feedback-flow/configuration/advanced-settings) - Advanced branding and customization
