Welcome to World of IPTV

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Forum Rules

Our Rules: Read to avoid getting banned!

Advertising

Introduce Yourself to the World with Us!

Resource Database

Find the newest resources around IPTV!

Account upgrade

Upgrade your account to unlock more benefits!

Info FIX for XUI to Buffer and disconections

Infest84

Basic Member
Basic Member
Joined
Mar 14, 2025
Messages
18
Reaction score
13
Points
14
Location
Panama
I have heard some people saying about XtreamUI does not happens, and trying to fix it by my own i have found some settings to fix it, not too perfect but works pretty well after.
first we need to go here /home/xui/bin/nginx/conf/ im using mobxterm so i edit wit his own editor, important, always doa backup from original file nginx.conf

i have replace text http till server and it leave like that
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
reset_timedout_connection on;
include gzip.conf;
fastcgi_read_timeout 200;
access_log off;
error_log /dev/null;
keepalive_timeout 120;
include balance.conf;
send_timeout 20m;

proxy_read_timeout 300s;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
sendfile_max_chunk 1m;
lingering_close off;
aio threads=pool_xui;
client_body_timeout 13s;
client_header_timeout 13s;
client_max_body_size 8m;
proxy_buffer_size 16k;
proxy_busy_buffers_size 24k;
proxy_buffers 64 4k;
proxy_max_temp_file_size 0;
real_ip_header X-Forwarded-For;
include realip_cdn.conf;
include realip_cloudflare.conf;
include realip_xui.conf;
include limit.conf;
limit_req_zone $binary_remote_addr zone=one:30m rate=20r/s;

server {
include ports/*.conf;
include codes/*.conf;
include ssl.conf;
include custom.conf;
index index.php index.html index.htm;
try_files $uri $uri.html $uri/ @extensionless-php;
root /home/xui/www/;
server_tokens off;
chunked_transfer_encoding off;
resolver 1.1.1.1 1.0.0.1 valid=300s;
resolver_timeout 5s;
absolute_redirect off;

# Add global parameters for proxy buffering
proxy_buffering off;
proxy_request_buffering off;

proxy_read_timeout 300s;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;

if ($request_method !~ ^(GET|POST)$) {
return 200;



Now FOR LB one by one same rout


http {
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
reset_timedout_connection on;
gzip off;
fastcgi_read_timeout 200;
access_log off;
error_log /dev/null;
keepalive_timeout 10;
include balance.conf;
send_timeout 20m;
sendfile_max_chunk 512k;
lingering_close off;
aio threads=pool_xui;
client_body_timeout 13s;
client_header_timeout 13s;
client_max_body_size 8m;
real_ip_header X-Forwarded-For;
include realip_cdn.conf;
include realip_cloudflare.conf;
include realip_xui.conf;
include limit.conf;
limit_req_zone $binary_remote_addr zone=one:30m rate=20r/s;

server {
include ports/*.conf;
include ssl.conf;
include custom.conf;
index index.php index.html index.htm;
try_files $uri $uri.html $uri/ @extensionless-php;
root /home/xui/www/;
server_tokens off;
chunked_transfer_encoding off;
resolver 1.1.1.1 1.0.0.1 valid=300s;
resolver_timeout 5s;
absolute_redirect off;

# Add global parameters for proxy buffering
proxy_buffering off;
proxy_request_buffering off;

proxy_read_timeout 300s;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;


JUST THAT LINES, what it does?

Additional details:
proxy_buffering off;: Prevents Nginx from buffering data in proxy responses.

proxy_request_buffering off;: Disables buffering for incoming requests.

chunked_transfer_encoding on;: Ensures data is sent in chunks .

proxy_read_timeout 300s;, proxy_connect_timeout 300s;, proxy_send_timeout 300s;: Set these values to 300 seconds or more to handle long connections, especially important when clients consume streams.


These changes should help stabilize connections on LBs and allow for a more consistent flow of data for streams.


finally on every edit use this command to refresh nginx
sudo /home/xui/bin/nginx/sbin/nginx -s reload



Because Xtream Codes already correctly implements many of these configurations by default:

It has long keepalive times.

It disables chunked transfer for streams.

It handles proxy buffering correctly.

It performs finer-grained balancing.

And it separates PHP and stream handlers, isolating loads.

In XUI, everything is centralized in a single nginx.conf, and if it's not fine-grained... it crashes.



With these XUI tweaks:
✔️ You reduce dropouts of 10-20 seconds.
✔️ You avoid timeout errors due to high preload.
✔️ You improve the stability of live IPTV connections.
✔️ You reduce automatic client reconnections due to poorly managed buffers.
 
Thanks for sharing.
A question, in the config chunked_transfer_encoding is off, but at the end of your post it is on to organize into blocks, what would be the ideal?
 
Thanks for sharing.
A question, in the config chunked_transfer_encoding is off, but at the end of your post it is on to organize into blocks, what would be the ideal?
For streaming (especially live):

chunked_transfer_encoding off;

Why?​

  • It prevents the use of chunked responses, which some IPTV clients don't support well.
  • It leads to more predictable and stable stream delivery.
  • It avoids issues with long-running connections where chunked encoding can cause client-side buffering errors or crashes.
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changcdn
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top