OBS Twitch streaming randomly disconnects, but the internet is fine

debugger76

New Member
My OBS randomly disconnects from Twitch with no reason. I start stream, everything is fine, then a massive frame network drop starts to rise, and booom. OBS tries to reconnect, usually after 2 or 3 attempts, and all start working well again, but after 10-30 min, the same problem.
Yesterday I was streaming for an 1 hour, after I finished, I have 9 VOD files? LOL

I'm on fiber internet (1000DL/750UP), wired cable to my router. I have a beefy pc, but PC or internet is not a problem here. All Discord stuff, music, games, whatever, is working normally at that moment. Just OBS, try reconnecting out of nowhere.
I was also trying different servers with Twitch bandwidth program , I'm getting 99 quality on all EU servers, but that doesn't help me. No matter what setting or server I choose, it disconnects randomly with no reason. Im also trying to lower my bitrate from 8000 > 6000 > 4000, but that also doesn't matter, same problem.
In OBS logs I'm getting "RTMPSockBuf_Fill, remote host closed connection", constantly.

So I choose to test it with YouTube stream. Same PC, same OBS, same Internet, same sceens, game. Bitrate was 8000 , streaming for 1 hour, no problem.
0 dropped frames, crisp and clear, all fine.
So it must be some problem with Twitch servers ????? or I'm out of luck?
 

PaiSand

Active Member
Please post an image of the TwitchTest results and a log file from a moment the issue happened.
It may be your ISP changed something in their network causing the issues. Or something in your side.
The error you pointed tells you the remote host (Twitch) have closed the connection.
 

debugger76

New Member
TwitchTest here.



OBS logs :
7:15:16.107: [FFmpeg aac encoder: 'adv_stream_audio'] bitrate: 192, channels: 2, channel_layout: stereo, track: 1
17:15:16.107:
17:15:16.107: ---------------------------------
17:15:16.107: [FFmpeg aac encoder: 'adv_archive_audio'] bitrate: 192, channels: 2, channel_layout: stereo, track: 6
17:15:16.107:
17:15:16.108: [rtmp stream: 'adv_stream'] Connecting to RTMP URL rtmp://ingest.global-contribute.live-video.net/app...
17:15:16.166: [rtmp stream: 'adv_stream'] Interface: Intel(R) Ethernet Controller (3) I225-V (ethernet, 1000↓/1000↑ mbps)
17:15:17.659: RTMPSockBuf_Fill, remote host closed connection
17:15:17.660: Output 'adv_stream': Reconnecting in 3.04 seconds..
17:15:17.660: [rtmp stream: 'adv_stream'] Connection to rtmp://ingest.global-contribute.live-video.net/app failed: -3
17:15:20.702: [rtmp stream: 'adv_stream'] Connecting to RTMP URL rtmp://ingest.global-contribute.live-video.net/app...
17:15:20.704: [rtmp stream: 'adv_stream'] Interface: Intel(R) Ethernet Controller (3) I225-V (ethernet, 1000↓/1000↑ mbps)
17:15:22.146: RTMPSockBuf_Fill, remote host closed connection
17:15:22.146: Output 'adv_stream': Reconnecting in 4.63 seconds..
17:15:22.146: [rtmp stream: 'adv_stream'] Connection to rtmp://ingest.global-contribute.live-video.net/app failed: -3
17:15:26.774: [rtmp stream: 'adv_stream'] Connecting to RTMP URL rtmp://ingest.global-contribute.live-video.net/app...
17:15:26.777: [rtmp stream: 'adv_stream'] Interface: Intel(R) Ethernet Controller (3) I225-V (ethernet, 1000↓/1000↑ mbps)
17:15:27.912: RTMPSockBuf_Fill, remote host closed connection
17:15:27.913: Output 'adv_stream': Reconnecting in 7.04 seconds..
17:15:27.913: [rtmp stream: 'adv_stream'] Connection to rtmp://ingest.global-contribute.live-video.net/app failed: -3
17:15:34.950: [rtmp stream: 'adv_stream'] Connecting to RTMP URL rtmp://ingest.global-contribute.live-video.net/app...
17:15:34.952: [rtmp stream: 'adv_stream'] Interface: Intel(R) Ethernet Controller (3) I225-V (ethernet, 1000↓/1000↑ mbps)
17:15:36.087: RTMPSockBuf_Fill, remote host closed connection
17:15:36.087: Output 'adv_stream': Reconnecting in 10.70 seconds..
17:15:36.087: [rtmp stream: 'adv_stream'] Connection to rtmp://ingest.global-contribute.live-video.net/app failed: -3
17:15:46.790: [rtmp stream: 'adv_stream'] Connecting to RTMP URL rtmp://ingest.global-contribute.live-video.net/app...
17:15:46.793: [rtmp stream: 'adv_stream'] Interface: Intel(R) Ethernet Controller (3) I225-V (ethernet, 1000↓/1000↑ mbps)
17:15:48.055: [rtmp stream: 'adv_stream'] Connection to rtmp://ingest.global-contribute.live-video.net/app (52.223.192.188) successful
17:15:48.055: [rtmp stream: 'adv_stream'] Socket send buffer is 65536 bytes
17:35:35.665: WriteN, RTMP send error 10060 (4097 bytes)
17:35:35.666: WriteN, RTMP send error 10038 (79 bytes)
17:35:35.666: WriteN, RTMP send error 10038 (42 bytes)
17:35:35.666: [rtmp stream: 'adv_stream'] Disconnected from rtmp://ingest.global-contribute.live-video.net/app
17:35:35.666: Output 'adv_stream': stopping
17:35:35.666: Output 'adv_stream': Total frames output: 70470 (71220 attempted)
17:35:35.666: Output 'adv_stream': Total drawn frames: 71333
17:35:35.666: Output 'adv_stream': Number of dropped frames due to insufficient bandwidth/connection stalls: 750 (1.1%)
17:35:35.666: Output 'adv_stream': Reconnecting in 2.00 seconds..
17:35:35.666: [rtmp stream: 'adv_stream'] Freeing 1714 remaining packets
17:35:37.694: [obs-nvenc: 'advanced_video_stream'] settings:
17:35:37.694: codec: H264
17:35:37.694: rate_control: CBR
17:35:37.694: bitrate: 6000
17:35:37.694: keyint: 120
17:35:37.694: preset: p7
17:35:37.694: tuning: hq
17:35:37.694: multipass: fullres
17:35:37.694: profile: high
17:35:37.694: width: 1920
17:35:37.694: height: 1080
17:35:37.694: b-frames: 2
17:35:37.694: b-ref-mode: 0
17:35:37.694: lookahead: true (28 frames)
17:35:37.694: aq: true
 

qhobbes

Active Member
OBS > Settings > Advanced > Network > check box for 'Dynamically change bitrate...' > [Apply] > [OK]

You want the Bandwidth and Quality to be high, 25000/100 tops, the RTT to be low, the ConWnd to be the same as the SndWnd (with the SndWnd being a large number), the Retrans to be low and the limited to be low but not 0. Based on your image, I would go with Frankfurt 5 or Dusseldorf 1.

If still having issues, then please post a link to a clean log file.
To make a clean log file, please follow these steps:

1) Restart OBS.
2) Start your stream for at least 30 seconds. Make sure you replicate any issues as best you can, which means having any games/apps open and captured, etc.
3) Stop your stream.
4) Select Help > Log Files > Upload Current Log File. Send that link here.
 

Mr.LongNight

New Member
Are you using one audio source on all six OBS audio channels? If you're using the second audio recording channel in OBS, I recommend disabling channel 2 for all audio sources in the advanced audio settings.

This is a very old, well-known, but even after years, still unsolved OBS issue. In my case, it demonstrably solved these damn random disconnections. At first, I didn't want to believe it because the other five channels work without any problems. Since I was able to clearly reproduce the error, I now know 100% that it's fixed. Perhaps the same problem is happening to you?!
 

debugger76

New Member
Are you using one audio source on all six OBS audio channels? If you're using the second audio recording channel in OBS, I recommend disabling channel 2 for all audio sources in the advanced audio settings.

This is a very old, well-known, but even after years, still unsolved OBS issue. In my case, it demonstrably solved these damn random disconnections. At first, I didn't want to believe it because the other five channels work without any problems. Since I was able to clearly reproduce the error, I now know 100% that it's fixed. Perhaps the same problem is happening to you?!
tnx for help, after saw your reply, I was try to disable all audio channels except ch1, remove checkmarks. But problem is still there. After 8 min of streaming, just got reconnecting without any reason for 5 sec, than live again??? Internet was fine at that moment because I was talking with my buddies on discord and gaming.
Twich is just NOT working for me, can watch, but cant upstream?? strange??
 

Mr.LongNight

New Member
tnx for help, after saw your reply, I was try to disable all audio channels except ch1, remove checkmarks. But problem is still there. After 8 min of streaming, just got reconnecting without any reason for 5 sec, than live again??? Internet was fine at that moment because I was talking with my buddies on discord and gaming.
Twich is just NOT working for me, can watch, but cant upstream?? strange??
OK, that's a shame I couldn't help you directly. Do you have OBS installed or are you using the portable version? If you haven't already, try using a fresh OBS and see if you have the same error. Download the latest version of OBS, unpack the files into a new folder and start it as a portable version. Then just set up a simple OBS test scene, connect your Twitch account, open the website https://inspector.twitch.tv and start a live stream. This way you can rule out whether the cause of the problem is a faulty OBS configuration or whether the error is caused by a plugin. If you have the same error, then the cause must either be your Windows installation or you have problems with your internet connection (network, router, internet provider, etc.). If you can't solve it, post the OBS log file again + Twitch Inspector logging data.
Wish you good luck!
 
Top