# Error in \<TNetXNGFile::ReadBuffers\>: \[ERROR\] Socket timeout

**URL:** <https://root-forum.cern.ch/t/error-in-tnetxngfile-readbuffers-error-socket-timeout/51380>\
**Category:** Newbie\
**Created:** [August 28, 2022, 1:53am UTC](https://root-forum.cern.ch/t/error-in-tnetxngfile-readbuffers-error-socket-timeout/51380 "2022-08-28T01:53:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hsaka](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/h/22d042/32.png) [@hsaka](https://root-forum.cern.ch/u/hsaka)\
**Post date:** [August 28, 2022, 1:53am UTC](https://root-forum.cern.ch/t/error-in-tnetxngfile-readbuffers-error-socket-timeout/51380/1 "2022-08-28T01:53:32Z")

</div>

Dear experts,

I am trying to access the centrally stored nanoAOD files and I get errors of the following type while opening/accessing a subset of them (TChain or TFile open):

```auto
Error in <TNetXNGFile::ReadBuffers>: [ERROR] Socket timeout
Error in <TBranch::GetBasket>: File: root://cms-xrd-global.cern.ch//store/mc/RunIISummer20UL18NanoAODv9/DYJetsToLL_M-50_TuneCP5_13TeV-amcatnloFXFX-pythia8/NANOAODSIM/106X_upgrade2018_realistic_v16_L1v1-v2/230000/42FA6498-8329-AE48-A3BF-60300BDE084D.root at byte:0, branch:nElectron, entry:0, badread=1, nerrors=1, basketnumber=0
 ***Break*** segmentation violation

```

The error seems to come during an RDataFrame snaphsot step, which may be running for a long time. Is there a way to keep it from timing out? I am able to manually download the file and run the script locally without using xrootd.

This is with ROOT 6.24/06.

Thanks!

---

<div class="post-metadata">

**Author:** ![eguiraud](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/eguiraud/32/32217_2.png) [@eguiraud](https://root-forum.cern.ch/u/eguiraud)\
**Post date:** [August 29, 2022, 8:38am UTC](https://root-forum.cern.ch/t/error-in-tnetxngfile-readbuffers-error-socket-timeout/51380/2 "2022-08-29T08:38:44Z")

</div>

Hi @hsaka ,

thank you for the report. The root cause of the problem seems to be a network error (a socket timeout) while reading the file. Maybe the connection was not stable during processing? Or maybe some settings on the server side prevent a long-lasting connection? Can you successfully read that file with `xrdcp` (the xrootd copy tool) or with [root-readspeed](https://github.com/eguiraud/root-readspeed/)?

Cheers,  
Enrico
