# How to Fix Unexpected Server Connection Errors

{% hint style="danger" %}
Error Message: An unexpected error occurred when trying to connect to the server. More information in the log file.&#x20;(Error code: 57996)
{% endhint %}

This error can occur during broadcasting or recording due to a variety of causes, including internal thread creation failures, network socket errors, unstable server connections, or storage access issues. Review each case below to identify the cause and apply the appropriate solution.

***

### 1. Data Transfer Thread or Socket Thread Creation Failed

**Cause**

When streaming via RTMP, the internal data send thread or socket thread fails to initialize, interrupting the connection. This is rare but may occur when system resources are insufficient.

**Solution**

Close all unnecessary programs to free up system resources. Fully quit PRISM Live Studio and relaunch it. If the issue persists, restart your computer and try again.

***

### 2. Socket Non-Blocking Mode Configuration Failed

**Cause**

When streaming via RTMP, the network socket fails to switch to non-blocking mode. This may be caused by an outdated or faulty network driver or an abnormal system network configuration.

**Solution**

Check that your network driver is up to date and update it if necessary. Disable and re-enable your network adapter, or restart your computer to reset the network state. If the issue continues, reset your network settings or contact your system administrator.

***

### 3. No Platform Connected When Starting WHIP Stream

**Cause**

When initiating a WHIP stream, the stream output has no platform or service associated with it, causing the broadcast to fail.

**Solution**

Before going live, confirm that a streaming channel is properly selected in Settings. If no channel appears, log back into your platform account and reconnect the channel.

***

### 4. WebRTC PeerConnection Failed During WHIP Stream

**Cause**

During a WHIP stream, the WebRTC PeerConnection status transitions to Failed, dropping the connection. This may be caused by network instability or an issue with the streaming server.

**Solution**

Verify that your network connection is stable. If possible, switch to a wired Ethernet (LAN) connection and disable any active VPN or proxy before retrying. Check your streaming platform's server status page to rule out a service outage.

***

### 5. Data Transmission Failed During HLS Stream

**Cause**

When streaming via HLS, data transmission fails. This may be caused by network instability, a streaming server error, or a failure in the data transmission subprocess.

**Solution**

Check your network connection and switch to a wired connection if it is unstable. Verify the streaming platform's server status to check for any service disruptions. Fully quit PRISM Live Studio, relaunch it to reinitialize the transmission process, and try again.

***

### 6. Write Thread Creation Failed During ffmpeg mpegts Stream

**Cause**

When streaming via ffmpeg mpegts output, the internal write thread fails to initialize. This is rare but may occur when system resources are insufficient.

**Solution**

Close all unnecessary programs to free up system resources. Fully quit PRISM Live Studio and relaunch it. If the issue persists, restart your computer and try again.

***

### 7. Data Write Failed During Recording (ffmpeg Output)

**Cause**

When recording via ffmpeg output, an error occurs while writing data to the file. This may be caused by an incorrect recording path, insufficient disk permissions, or not enough available storage space.

**Solution**

In Settings, verify that the recording save path is correctly configured. Confirm that the destination folder has write permissions and update the access rights if necessary. Also check that the target drive has sufficient free space.

***

### 8. File Segment Switch or Data Write Failed During MP4 Recording

**Cause**

When recording in MP4 format, the file fails to switch during segmentation or a data write error occurs. This may be caused by an incorrect recording path, insufficient disk permissions, or not enough available storage space.

**Solution**

In Settings, verify that the recording save path is correctly configured. Confirm that the destination folder has write permissions and update the access rights if necessary. Check that the target drive has sufficient free space. If the issue persists, change the recording path to a different drive or folder and try again.

***

If the issue persists after following the steps above, please contact us.

**How to Contact Us:**

1. Click the **PRISM info** **(?)** icon located at the bottom right of the app.
2. Select the **Contact us** menu to submit your inquiry.
3. **Note:** Providing a detailed description of the situation (e.g., the platform used and the specific steps taken before the error appeared) will help our team analyze your case and resolve the issue much faster.

[..](https://guide.prismlive.com/desktop "mention"), [..](https://guide.prismlive.com/desktop/guides "mention"), [..](https://guide.prismlive.com/desktop/guides/error-solution "mention"), [streaming](https://guide.prismlive.com/desktop/guides/streaming "mention")
