# Logs Service server responded with an internal error (potentially load-shedding)

**URL:** <https://community.auth0.com/t/logs-service-server-responded-with-an-internal-error-potentially-load-shedding/170139>\
**Category:** Get Help\
**Tags:** identifier-first, login-experience\
**Created:** [January 24, 2025, 9:52pm UTC](https://community.auth0.com/t/logs-service-server-responded-with-an-internal-error-potentially-load-shedding/170139 "2025-01-24T21:52:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![emurphy](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/emurphy/32/60386_2.png) [@emurphy](https://community.auth0.com/u/emurphy)\
**Post date:** [January 24, 2025, 9:52pm UTC](https://community.auth0.com/t/logs-service-server-responded-with-an-internal-error-potentially-load-shedding/170139/1 "2025-01-24T21:52:20Z")

</div>

Receiving this error when calling the logs endpoint. Are these endpoints rate limited? If so, how do I get around this?

> Logs Service server responded with an internal error (potentially load-shedding)

```auto
for i in range(99):
    # execute Auth0 get user request
    url = "https://***.auth0.com/api/v2/logs"
    parameters = {'page': i, 'per_page': 99, 'client_name':'My Application', 'type':'s*', 'date':'[2025-01-01 TO *]'}
    headers = {'Content-type': 'application/json', 'Accept': 'text/plain', 'Authorization': BEARER}
    response = requests.get(url, headers=headers, params=parameters)

    data = json.loads(response.text)    
    json_string = json.dumps(data)
    strg = json_string.strip("[]")

    # dump log response to file
    with open(FILE_PATH,'w') as outfile:
        outfile.write(strg)

```

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [January 24, 2025, 10:34pm UTC](https://community.auth0.com/t/logs-service-server-responded-with-an-internal-error-potentially-load-shedding/170139/3 "2025-01-24T22:34:06Z")

</div>

Hi @emurphy

As per our [Management API Documentation](https://auth0.com/docs/deploy-monitor/logs/retrieve-log-events-using-mgmt-api), there is a limitation of 100 log events per request to retrieve logs, also you may only paginate through up to 1,000 search results.

However, can you provide me the exact error code and full message in order to investigate this further if necessary?

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![emurphy](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/emurphy/32/60386_2.png) [@emurphy](https://community.auth0.com/u/emurphy)\
**Post date:** [January 27, 2025, 2:37pm UTC](https://community.auth0.com/t/logs-service-server-responded-with-an-internal-error-potentially-load-shedding/170139/4 "2025-01-27T14:37:37Z")

</div>

Thanks for your response Nik. See below.

`{"statusCode": 400, "error": "Bad Request", "message": "Logs Service server responded with an internal error (potentially load-shedding)"}`

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [January 27, 2025, 6:26pm UTC](https://community.auth0.com/t/logs-service-server-responded-with-an-internal-error-potentially-load-shedding/170139/5 "2025-01-27T18:26:34Z")

</div>

Hi @emurphy

I have looked into the issue that you are facing and first of all, you request URI seems to be valid, I have tested on my end a similar URL for the request and it seemed to go through:

```auto
https://{{auth0_domain}}/api/v2/logs?page=0&per_page=99&client_name={random_app_name}&type=s*&date=2025-01-01 TO *

```

I believe the issue that you are having is caused by the fact that you are making too many requests to the Log Server and that is why you are receiving a load-shedding error

You can try testing it out with fewer requests, such as using `for i in range(5)` to see if you receive the same error.

Let me know if you are still facing issues with the error or if you have any other questions on the matter.

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![emurphy](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/emurphy/32/60386_2.png) [@emurphy](https://community.auth0.com/u/emurphy)\
**Post date:** [January 29, 2025, 1:53pm UTC](https://community.auth0.com/t/logs-service-server-responded-with-an-internal-error-potentially-load-shedding/170139/6 "2025-01-29T13:53:07Z")

</div>

Fewer requests works, and should have mentioned that in my original post. So basically there is no way to retrieve in bulk without additional pagination logic. Thanks for your help.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 12, 2025, 1:53pm UTC](https://community.auth0.com/t/logs-service-server-responded-with-an-internal-error-potentially-load-shedding/170139/7 "2025-02-12T13:53:08Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
