Connection to GIBS WMS Service times out

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
amsayer
Posts: 32
Joined: Tue Jan 25, 2011 3:03 pm America/New_York
Answers: 0
Endorsed: 1 time

Connection to GIBS WMS Service times out

by amsayer » Mon Dec 01, 2025 2:18 pm America/New_York

I'm trying to follow this tutorial: https://github.com/nasa-gibs/gibs-api-docs/blob/main/docs/python-usage.ipynb

Last week I tried with Python 3.12 and it was a bust, as I have since learned that 3.12 isn't compatible with some crucial things (so I couldn't install/important various packages). Today I switched to 3.11 and it has been doing better.

I first tried to replicate the results of "Basic WMS connection":

Code: Select all

# Connect to GIBS WMS Service
wms = WebMapService('https://gibs.earthdata.nasa.gov/wms/epsg4326/best/wms.cgi?', version='1.1.1')

# Configure request for MODIS_Terra_CorrectedReflectance_TrueColor
img = wms.getmap(layers=['MODIS_Terra_CorrectedReflectance_TrueColor'],  # Layers
                 srs='epsg:4326',  # Map projection
                 bbox=(-180,-90,180,90),  # Bounds
                 size=(1200, 600),  # Image size
                 time='2021-09-21',  # Time of data
                 format='image/png',  # Image format
                 transparent=True)  # Nodata transparency

# Save output PNG to a file
out = open('python-examples/MODIS_Terra_CorrectedReflectance_TrueColor.png', 'wb')
out.write(img.read())
out.close()

# View image
Image('python-examples/MODIS_Terra_CorrectedReflectance_TrueColor.png')
That worked ok. But now I come back to it 30 mins or so later and I keep getting a timeout on this line:

Code: Select all

# Connect to GIBS WMS Service
wms = WebMapService('https://gibs.earthdata.nasa.gov/wms/epsg4326/best/wms.cgi?', version='1.1.1')
A colleague in the same lab is also having the timeout issue now. Is the service down or am I/are we blocked?

Filters:

GIBS & Worldview - mwong4
Subject Matter Expert
Subject Matter Expert
Posts: 25
Joined: Fri Feb 28, 2020 3:43 pm America/New_York
Answers: 0
Endorsed: 1 time

Re: Connection to GIBS WMS Service times out

by GIBS & Worldview - mwong4 » Mon Dec 01, 2025 4:03 pm America/New_York

Hello @amsayer ! We noticed the issue about an hour ago and also got some timeout issues, but it seems to be working now. Could you try again? Let us know.

amsayer
Posts: 32
Joined: Tue Jan 25, 2011 3:03 pm America/New_York
Answers: 0
Endorsed: 1 time

Re: Connection to GIBS WMS Service times out

by amsayer » Tue Dec 02, 2025 10:35 am America/New_York

Thanks - it is indeed working this morning!

GIBS & Worldview - mwong4
Subject Matter Expert
Subject Matter Expert
Posts: 25
Joined: Fri Feb 28, 2020 3:43 pm America/New_York
Answers: 0
Endorsed: 1 time

Re: Connection to GIBS WMS Service times out

by GIBS & Worldview - mwong4 » Tue Dec 02, 2025 11:03 am America/New_York

Glad to hear it's working again!

amsayer
Posts: 32
Joined: Tue Jan 25, 2011 3:03 pm America/New_York
Answers: 0
Endorsed: 1 time

Re: Connection to GIBS WMS Service times out

by amsayer » Tue Dec 02, 2025 11:41 am America/New_York

It seems to be down again - I got about half of what I needed but now more timeouts.

GIBS & Worldview - mwong4
Subject Matter Expert
Subject Matter Expert
Posts: 25
Joined: Fri Feb 28, 2020 3:43 pm America/New_York
Answers: 0
Endorsed: 1 time

Re: Connection to GIBS WMS Service times out

by GIBS & Worldview - mwong4 » Tue Dec 02, 2025 12:22 pm America/New_York

We have been doing deployments today around 10:24 - 10:42 EST. Wonder if that is why you are getting timeouts? Can you check again now?

amsayer
Posts: 32
Joined: Tue Jan 25, 2011 3:03 pm America/New_York
Answers: 0
Endorsed: 1 time

Re: Connection to GIBS WMS Service times out

by amsayer » Tue Dec 02, 2025 2:06 pm America/New_York

Still timing out, I'm afraid...

EDIT: seems up as of 2:14 pm Eastern.

amsayer
Posts: 32
Joined: Tue Jan 25, 2011 3:03 pm America/New_York
Answers: 0
Endorsed: 1 time

Re: Connection to GIBS WMS Service times out

by amsayer » Tue Dec 02, 2025 2:28 pm America/New_York

It was working but at 2:25 pm Eastern times out again... could it be that I'm being blocked? Is there a request limit? (I'm making about 730 calls total, sequentially, a few seconds between each; it's got maybe 100-200 through before timing out. Then a fresh attempt times out immediately.)

GIBS & Worldview - mwong4
Subject Matter Expert
Subject Matter Expert
Posts: 25
Joined: Fri Feb 28, 2020 3:43 pm America/New_York
Answers: 0
Endorsed: 1 time

Re: Connection to GIBS WMS Service times out

by GIBS & Worldview - mwong4 » Tue Dec 02, 2025 4:40 pm America/New_York

@amsayer We will look into it more closely. I don't believe you are being blocked and it doesn't sound like you're making too many requests.

amsayer
Posts: 32
Joined: Tue Jan 25, 2011 3:03 pm America/New_York
Answers: 0
Endorsed: 1 time

Re: Connection to GIBS WMS Service times out

by amsayer » Thu Dec 04, 2025 12:03 pm America/New_York

Hi, I was out yesterday but getting a different error today (error 500 as opposed to timeout):

Code: Select all

Traceback (most recent call last):
  File "/accounts/asayer/python/wms/download_oci_wms.py", line 24, in <module>
    img = wms.getmap(layers=['OCI_PACE_True_Color'],  # Layers
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/accounts/asayer/miniforge3/envs/my_environment/lib/python3.11/site-packages/owslib/map/wms111.py", line 264, in getmap
    u = openURL(base_url, data, method, timeout=timeout or self.timeout, auth=self.auth, headers=self.headers)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/accounts/asayer/miniforge3/envs/my_environment/lib/python3.11/site-packages/owslib/util.py", line 214, in openURL
    req.raise_for_status()
  File "/accounts/asayer/miniforge3/envs/my_environment/lib/python3.11/site-packages/requests/models.py", line 1026, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://gitc.earthdata.nasa.gov/wms/epsg4326/best/?service=WMS&version=1.1.1&request=GetMap&layers=OCI_PACE_True_Color&styles=&width=14400.0&height=7200.0&srs=epsg%3A4326&bbox=-180%2C-90%2C180%2C90&format=image%2Fpng&transparent=TRUE&exceptions=application%2Fvnd.ogc.se_xml&bgcolor=0xFFFFFF&time=2024-01-07
Note: I know 2024-01-07 is before PACE launch, that's not the problem (should give a totally black image and was before). The script I wrote is not smart and just loops over each day from 2024 onwards.

EDIT: I waited a bit and reran, now back to timeout errors. I tried coarsening the resolution of the images I'm requesting (from 0.025 degrees to 0.25 degrees) and that worked fine. So now I'm wondering if perhaps the image retrieval time exceeds the default 30 second timeout in some cases. I've tried rerunning specifying a 120 second timeout instead... will know later today if that fixed it. Thought I would update the post in case anyone else has this issue.

Post Reply