# ServiceException: (504)

**URL:** <https://community.pinecone.io/t/serviceexception-504/2160>\
**Category:** Support\
**Tags:** error-504\
**Created:** [June 7, 2023, 11:54pm UTC](https://community.pinecone.io/t/serviceexception-504/2160 "2023-06-07T23:54:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashutosh](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@ashutosh](https://community.pinecone.io/u/ashutosh)\
**Post date:** [June 7, 2023, 11:54pm UTC](https://community.pinecone.io/t/serviceexception-504/2160/1 "2023-06-07T23:54:22Z")

</div>

Hi,

When trying to update embeddings from haystack, I am getting the following error

```auto

Reason: Gateway Timeout
HTTP response headers: HTTPHeaderDict({'content-type': 'text/plain', 'content-length': '24', 'date': 'Wed, 07 Jun 2023 23:47:51 GMT', 'server': 'envoy'})
HTTP response body: upstream request timeout

```

I have been running the same code snippet for the couple of weeks but it has stopped working for me today. I was wandering if I hit a free tier limit somewhere.

I would be grateful if anyone can help me solve the problem

---

<div class="post-metadata">

**Author:** ![Cory\_Pinecone](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/cory_pinecone/32/1712_2.png) [@Cory\_Pinecone](https://community.pinecone.io/u/Cory_Pinecone)\
**Post date:** [June 8, 2023, 3:13pm UTC](https://community.pinecone.io/t/serviceexception-504/2160/2 "2023-06-08T15:13:46Z")

</div>

Hi @ashutosh. Please check your email, I just sent you a proactive ticket on this issue. The short version is your index has a very high degree of cardinality which is preventing it from being built.

---

<div class="post-metadata">

**Author:** ![ashutosh](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@ashutosh](https://community.pinecone.io/u/ashutosh)\
**Post date:** [June 8, 2023, 3:55pm UTC](https://community.pinecone.io/t/serviceexception-504/2160/3 "2023-06-08T15:55:38Z")

</div>

hey haven’t received any mail yet, can you retry?

---

<div class="post-metadata">

**Author:** ![wissam.moussa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/wissam.moussa/32/1461_2.png) [@wissam.moussa](https://community.pinecone.io/u/wissam.moussa)\
**Post date:** [March 19, 2024, 2:44am UTC](https://community.pinecone.io/t/serviceexception-504/2160/4 "2024-03-19T02:44:38Z")

</div>

Could you please post the solution here so we could all benefit from it??  
Everything was working fine and I have a demo tomorrow to many potential customers and this happens!! Need urgent help!!

---

<div class="post-metadata">

**Author:** ![pwozny](https://avatars.discourse-cdn.com/v4/letter/p/e56c9b/32.png) [@pwozny](https://community.pinecone.io/u/pwozny)\
**Post date:** [March 19, 2024, 9:03am UTC](https://community.pinecone.io/t/serviceexception-504/2160/5 "2024-03-19T09:03:44Z")

</div>

Also getting this error, was working fine yesterday.  
I have a much smaller index (1/100th) the size that works ok, but my main large index has been off and on all day with this same error.

---

<div class="post-metadata">

**Author:** ![wissam.moussa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/wissam.moussa/32/1461_2.png) [@wissam.moussa](https://community.pinecone.io/u/wissam.moussa)\
**Post date:** [March 19, 2024, 2:09pm UTC](https://community.pinecone.io/t/serviceexception-504/2160/6 "2024-03-19T14:09:59Z")

</div>

It decided to work fine again now.  
That’s good, but unreliable. We still have no clue why it went down last night and when that would happen again.

---

<div class="post-metadata">

**Author:** ![patrick1](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/patrick1/32/1863_2.png) [@patrick1](https://community.pinecone.io/u/patrick1)\
**Post date:** [March 21, 2024, 5:13pm UTC](https://community.pinecone.io/t/serviceexception-504/2160/7 "2024-03-21T17:13:29Z")

</div>

Split this topic on March 21, 2024, 5:13pm UTC

A post was split to a new topic: [504 errors and cannot connect in the web console](https://community.pinecone.io/t/504-errors-and-cannot-connect-in-the-web-console/4946)

---

<div class="post-metadata">

**Author:** ![patrick1](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/patrick1/32/1863_2.png) [@patrick1](https://community.pinecone.io/u/patrick1)\
**Post date:** [March 21, 2024, 5:28pm UTC](https://community.pinecone.io/t/serviceexception-504/2160/8 "2024-03-21T17:28:15Z")

</div>

Hello all,

504 error is a genric error and there can be a number of different causes, some trigger by user actions and other times there is an internal error on our side.

Unfortunely there is not a sliver bullet soultion and each case has to be looked at in turn.

In most case the problem is when the index is overloaded for exampling:

- Trying to put 3 million vectors with 512 dimensions into a `P1.x1` configuration when it can support about [1,250,000](https://docs.pinecone.io/guides/indexes/choosing-a-pod-type-and-size)
- Large [Metadata cardinality and size](https://docs.pinecone.io/guides/indexes/choosing-a-pod-type-and-size#metadata-cardinality-and-size) when there is no [Selective metadata indexing](https://docs.pinecone.io/guides/indexes/configure-pod-based-indexes#selective-metadata-indexing)

In both of these cases increasing the size of the pod resolves the issue.

The good news is that our new serverless index address these points and many others.

---

<div class="post-metadata">

**Author:** ![patrick1](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/patrick1/32/1863_2.png) [@patrick1](https://community.pinecone.io/u/patrick1)\
**Post date:** [March 21, 2024, 5:29pm UTC](https://community.pinecone.io/t/serviceexception-504/2160/9 "2024-03-21T17:29:10Z")

</div>

@pwozny and @wissam.moussa if you have not already please do open a support case and we can look into these issues.

---

<div class="post-metadata">

**Author:** ![wissam.moussa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/wissam.moussa/32/1461_2.png) [@wissam.moussa](https://community.pinecone.io/u/wissam.moussa)\
**Post date:** [March 21, 2024, 8:06pm UTC](https://community.pinecone.io/t/serviceexception-504/2160/10 "2024-03-21T20:06:27Z")

</div>

Thanks! We’re trying out the new serverless index this week
