# Perplexity Sonar Deep Research Model Timeout Issue - Seeking Solution

:bug: Describe the Bug

## Problem Summary

I’m experiencing consistent timeout issues with the `sonar-deep-research` model in my production application. The model works fine for simple requests but consistently times out after approximately 60 seconds for complex report generation tasks.

:white_check_mark: Expected Behavior

work as before - output content

:cross_mark: Actual Behavior

credit deducted but timeout, so no output created

:counterclockwise_arrows_button: Steps to Reproduce

:pushpin: API Request & Response (if applicable)

:globe_showing_europe_africa: Environment

  • ## Environment Details

    - **Model**: `sonar-deep-research`

    - **API Endpoint**: `https://api.perplexity.ai/chat/completions\`

    - **Client**: Node.js with undici fetch

    - **Request Timeout**: 15 minutes (client-side)

    - **Issue**: Server closes connection after ~60 seconds

:paperclip: Logs or Screenshots (if applicable)

## Detailed Error Logs

### Error Pattern

```

SocketError: other side closed

- Code: UND_ERR_SOCKET

- Remote: 104.18.27.48:443

- Bytes Written: 8353 (request sent successfully)

- Bytes Read: 0 (no response received)

- Timeout: ~60 seconds consistently

```

### Test Results Comparison

| Test Type | Model | Status | Duration | Error |

|-----------|-------|--------|----------|-------|

| Simple Hello | sonar-deep-research | :white_check_mark: SUCCESS | 7s | None |

| Full Report | sonar-deep-research | :cross_mark: FAILED | 60s | Socket closed |

| Same Report | sonar | :white_check_mark: SUCCESS | 21s | None |

### Complete Error Log

```json

{

“error”: “TypeError: fetch failed”,

“cause”: {

“type”: “SocketError”,

“message”: “other side closed”,

“code”: “UND_ERR_SOCKET”,

“socket”: {

“localAddress”: “26.26.26.1”,

“localPort”: 59321,

“remoteAddress”: “104.18.27.48”,

“remotePort”: 443,

“remoteFamily”: “IPv4”,

“timeout”: null,

“bytesWritten”: 8353,

“bytesRead”: 0

}

}

}

```

## Request Configuration

```json

{

“model”: “sonar-deep-research”,

“messages”: [

{

“role”: “system”,

“content”: “[COMPREHENSIVE_SYSTEM_PROMPT_FOR_INVESTMENT_ANALYSIS]”

},

{

“role”: “user”,

“content”: “Analyze Apple Inc. (AAPL) with current price $150.00”

}

],

“max_tokens”: 15000,

“temperature”: 0.0,

“search_queries”: true,

“search_recency_filter”: “month”,

“return_citations”: true,

“top_p”: 0.1,

“presence_penalty”: 0.0,

“frequency_penalty”: 0.0

}

```

## What I’ve Tried

1. **Reduced token limits** (15000 → 12000 → 10000)

2. **Shortened search recency** (month → week)

3. **Simplified prompts** (still times out)

4. **Connection optimization** (keep-alive headers)

5. **Retry mechanisms** (3 attempts with delays)

6. **Streaming approach** (same timeout issue)

## Key Observations

- **Model-specific issue**: Only `sonar-deep-research` fails; `sonar` works perfectly

- **Consistent pattern**: Always fails after ~60 seconds regardless of request complexity

- **Server-side closure**: Server accepts request but closes connection during processing

- **No response data**: Bytes written but zero bytes read

## Business Impact

- **High Priority**: Blocking production report generation

- **User Experience**: Reports fail to generate consistently

- **Cost**: API credits consumed without successful completion

- **Reliability**: Service appears unreliable to users

## Questions for the Community

1. **Is this a known issue** with `sonar-deep-research` model?

2. **Are there specific parameters** that can prevent this timeout?

3. **Is there a server-side timeout limit** for this model that’s different from others?

4. **What’s the recommended approach** for handling long-running deep research tasks?

5. **Are there any workarounds** that have worked for others?

## Request for Help

I need to use `sonar-deep-research` specifically for its deep research capabilities, but the consistent 60-second timeout makes it unusable for production. Any insights, workarounds, or solutions would be greatly appreciated.

## Contact Information

- **Application**: TopAnalyst - Investment Analysis Platform

- **Use Case**: Generating comprehensive investment reports

- **Priority**: High (blocking production usage)

-–

**Note**: This issue is preventing the use of `sonar-deep-research` model in production applications. The regular `sonar` model works fine, suggesting the issue is specific to the deep research model’s implementation or server-side processing limits.

:memo: Additional Context

Add any other context about the problem here.

I experience the same issue since today. Have been using deep-research model for some time now and never ran into timeouts. Credits are deducted too though….

+1 I’m experiencing this issue as well

Likewise, its costing me millions of tokens and my application does not run due to constant time out issues. Has anyone found a solution?

no I am still waiting for the team’s final response, said they are reviewing