> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting Issues

> Diagnose and fix problems

## Report Problems

```
users are reporting errors, investigate
```

<img src="https://mintcdn.com/monk-d20f97b6/KWBMwT0lyIP8SGUy/assets/GIF%20monk%20sugest%20fix%20of%20problem.gif?s=e9aeb48fe14718cbdbbb9cd8b35b133d" alt="Deploy project fix by monk" height="200" className="rounded-lg" data-path="assets/GIF monk sugest fix of problem.gif" />

Tell Monk about issues - it investigates autonomously.

→ [Monitoring](/features/monitoring)

## Performance Issues

```
why is the API slow?
```

Monk checks code, logs, metrics, and infrastructure to diagnose.

## Application Errors

```
the frontend isn't loading, what's wrong?
```

Troubleshoot specific problems.

## Database Problems

```
check the database performance
```

Analyze database query times and resource usage.

→ [Databases](/features/databases)

## Service Issues

```
the API server keeps crashing
```

Diagnose service failures.

## Network Problems

```
services can't connect to the database
```

Debug connectivity issues.

→ [Networking](/features/networking)

## What Monk Does

**Autonomous investigation:**

1. Reads logs across all services
2. Checks metrics and resource usage
3. Examines workload state
4. Correlates data to find root cause
5. Suggests fixes

**Example:**

```
You: Users reporting 500 errors

Monk: Investigating...

      Found: API server #2 out of memory
      Cause: Memory leak in session handling
      Impact: ~150 active users affected

      Fix: Restart affected instance and scale up

      Should I proceed?
```

## Common Issues

**High CPU/Memory:**

```
what's using all the CPU?
which service is using the most memory?
```

**Connectivity:**

```
can the API reach the database?
test the connection to Redis
```

**Errors:**

```
show me recent errors
filter logs for 500 errors
```

**Performance:**

```
what's causing slow queries?
why is the cache hit rate low?
```

## Get Detailed Info

**Logs:**

```
show me the last 100 lines of API logs
check logs from the past hour
```

**Metrics:**

```
show me resource usage for the past day
compare current vs normal performance
```

**Status:**

```
which services are unhealthy?
show me failed deployments
```

## After Diagnosis

**Apply fixes:**

```
restart the API server
scale up the database
increase worker memory
```

**Code fixes (if deployment-related):**

If Monk identifies a code issue causing deployment problems, it may propose fixes:

```
Monk: The issue is your app reads REDIS_HOST but Monk provides REDIS_URL.
      I can update your code to read from REDIS_URL. Should I fix this?

You: Yes, fix it
```

→ See [Source Code Editing](/features/code-editing) for targeted code fixes

**Verify:**

```
check if the issue is resolved
test the API endpoint
```

## Next Steps

* [Monitoring & Debugging](/prompting/monitoring-and-debugging) - Continuous monitoring
* [Scaling Resources](/prompting/scaling-resources) - Scale to fix capacity issues
* [Configuring Services](/prompting/configuring-services) - Adjust settings
