lossless1024 / StreaMonitor

Adult live stream downloader for advanced people. I could have chosen a better name.
GNU General Public License v3.0
172 stars 42 forks source link

Repeated SSLEOFError After Prolonged Program Execution #124

Open xantorn opened 8 months ago

xantorn commented 8 months ago

When running the program continuously for several hours, repeated SSL errors occur during any requests.get attempts.

Error: HTTPSConnectionPool(host='de.bongacams.net', port=443): Max retries exceeded with url: /tools/amf.php (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)'))) Error: HTTPSConnectionPool(host='chaturbate.com', port=443): Max retries exceeded with url: /get_edge_hls_url_ajax/ (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)')))

The error suggests a premature termination of the connection, potentially due to connection pooling problems. It might be hitting file descriptor or connection limits due to high concurrency.

There could be potential issues with the connection pooling mechanism of the requests library.

DerBunteBall commented 8 months ago

Did it work earlier?

How much performers do you have in list?

xantorn commented 8 months ago

Did it work earlier?

How much performers do you have in list?

Varying between 100-300

DerBunteBall commented 8 months ago

I don't think that this is due to a limitation by the requests module.

This should appear after starting the app because in this case all performers get check and so that's the moment where the most requests get fired. I actually don't see why this should change after hours because the drifting recheck times lead to a spreading of the request amount over time. So at the start all performers get checked (e.g. 100 requests get send). If 10 models are online they don't get checked again until they went offline. So 90 models would check every 30 seconds (if everything is well) and the others will do this at a random time. So everything spreads over time.

The error indicates by message and by line in the SSL module code that something around the TLS handshake fails.

When the error occurs can you watch the streams regularily in a browser? My first thoughts would be a strange blocking mechanism by the server side which leads to a broken TLS connection or bandwidth problems. Monitoring up to 300 performers chould lead to relevant amount of parallel records which can need much bandwidth. This could lead to situation where connected connection work well but new ones getting slow which could lead to timing issues and connection losses in TLS. Timing and constant connection is really relevant in TLS.