Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Session reuse between download requests within the same thread #913

Open
1 task done
hailiangzhang opened this issue Jan 5, 2025 · 2 comments
Open
1 task done

Comments

@hailiangzhang
Copy link

hailiangzhang commented Jan 5, 2025

Is this issue already tracked somewhere, or is this a new report?

  • I've reviewed existing issues and couldn't find a duplicate for this problem.

Current Behavior

There is recently a DSE issue reported by Earthdata Login (EDL) during data download requests involving large amount of granules through EarthAccess. One issue was traced to EarthAccess creating a new session for each download instead of reusing the existing session cookie, which is intended to reduce the number of requests to EDL by the DAAC data distribution endpoint (TEA).

Expected Behavior

The session cookie should be reused between download requests from the same thread.

Steps To Reproduce

By running the following scripts:

import earthaccess

# 1. Login
earthaccess.login(strategy="netrc")

# 2. Search
results = earthaccess.search_data(
    short_name='GLDAS_VIC10_M',
    bounding_box=(-180, -90, 180, 90),
    temporal=("2003-01", "2023-05"),  # ...and time period of interest.
    count=2
)

# 3. Access
files = earthaccess.download(results, "output", threads=1)

TEA was observed to make separate EDL requests for each download instead of reusing the session cookie as designated.

Environment

- OS: Mac 14.7.2 (23H311)
- Python: 3.11.3

Additional Context

No response

@hailiangzhang
Copy link
Author

There is an open PR trying to address this issue:
#909

@mfisher87 mfisher87 changed the title [BUG] {{ Session reuse between download requests within the same thread }} [BUG] Session reuse between download requests within the same thread Jan 5, 2025
@betolink
Copy link
Member

The PR was merged on Friday, if everything goes as planned we'll release 0.13.0 this week and we could tell the IBM people to try it and we'll close this issue if we see no spikes in EDL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants