#  Obspy server timeout "get.waveforms" from INGV #2845 

**URL:** https://discourse.obspy.org/t/obspy-server-timeout-get-waveforms-from-ingv-2845/1253
**Category:** Usage Questions
**Created:** [June 8, 2021, 9:02am UTC](https://discourse.obspy.org/t/obspy-server-timeout-get-waveforms-from-ingv-2845/1253 "2021-06-08T09:02:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![zersorger](https://discourse.obspy.org/user_avatar/discourse.obspy.org/zersorger/32/425_2.png) [@zersorger](https://discourse.obspy.org/u/zersorger)
#### Post date: [June 8, 2021, 9:02am UTC](https://discourse.obspy.org/t/obspy-server-timeout-get-waveforms-from-ingv-2845/1253/1 "2021-06-08T09:02:03Z")

</div>

In the hopes I was wondering if there is any possibility how to bypass this error.

In essence, I’ve got a catalog of ~90 events and I want to get the waveforms from each of it from a seismic station of the IVNG in Italy. I want to loop the get.waveforms to get al stream list in the end, but after random amounds of streams, I get a error messange that connection was bad or server did not respond. I also tried to raise the timeout time of the client, but it did not help, I guess it’s the time limit of the INGV server then.

The code I use:

```
st = []
d = 0
while d < len(cat):
      st.append(c.get_waveforms("IV", "PRMA", "*", "HH*", t[d] - 60, t[d] + 90*60))
      d = d + 1

```

The error line after random amound of downloaded waveforms:

> obspy.clients.fdsn.header.FDSNException: Unknown Error (URLError): \<urlopen error [WinError 10060] Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat

I updated obspy in Pycharm and using the latest version.

Is there a possibility to maybe write the streams st whenever the connection gets lost, and then continuing at that event of the catalog where connection was lost, dynamically? E.g., first attempt I got the first 10 event streams until the error → write to st1. Then start again but after the first 10 events → write the next few until the error…and so on…

Sorry for bothering you, I’m not very good in Python yet and thanks for any input.

---

<div class="post-metadata">

### Author: ![filefolder](https://discourse.obspy.org/user_avatar/discourse.obspy.org/filefolder/32/411_2.png) [@filefolder](https://discourse.obspy.org/u/filefolder)
#### Post date: [June 11, 2021, 11:50am UTC](https://discourse.obspy.org/t/obspy-server-timeout-get-waveforms-from-ingv-2845/1253/2 "2021-06-11T11:50:29Z")

</div>

You could keep track of how many events you’ve downloaded successfully.. here is a very very simple way

```
st = obspy.Stream()
done = 0 #don't reset this
d = 0
while done <= d < len(cat):
      st.append(c.get_waveforms("IV", "PRMA", "*", "HH*", t[d] - 60, t[d] + 90*60))
      done += 1
      d += 1

```

As for why the timeouts are occurring, you may be asking for too much data too quickly, but it’s impossible to say. Does it timeout if you shorten it to a few min?

---

<div class="post-metadata">

### Author: ![zersorger](https://discourse.obspy.org/user_avatar/discourse.obspy.org/zersorger/32/425_2.png) [@zersorger](https://discourse.obspy.org/u/zersorger)
#### Post date: [June 18, 2021, 7:57am UTC](https://discourse.obspy.org/t/obspy-server-timeout-get-waveforms-from-ingv-2845/1253/3 "2021-06-18T07:57:07Z")

</div>

Thanks for the reply!  
No matter how short on long I set the timeout, there are always the same events missing on one station, on ther stations the same but other events. I think it’s not a server problem, but there actually is no data available?

---

<div class="post-metadata">

### Author: ![filefolder](https://discourse.obspy.org/user_avatar/discourse.obspy.org/filefolder/32/411_2.png) [@filefolder](https://discourse.obspy.org/u/filefolder)
#### Post date: [June 18, 2021, 11:31am UTC](https://discourse.obspy.org/t/obspy-server-timeout-get-waveforms-from-ingv-2845/1253/4 "2021-06-18T11:31:51Z")

</div>

Yeah I suspect it’s probably just not there, data gaps are more of a rule than exception.
