# Exception has occurred: ConnectTimeout HTTPSConnectionPool

**URL:** <https://forum.alpaca.markets/t/exception-has-occurred-connecttimeout-httpsconnectionpool/10425>\
**Category:** Alpaca Trading\
**Created:** [August 24, 2022, 3:08pm UTC](https://forum.alpaca.markets/t/exception-has-occurred-connecttimeout-httpsconnectionpool/10425 "2022-08-24T15:08:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![KD\_A](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/kd_a/32/3431_2.png) [@KD\_A](https://forum.alpaca.markets/u/KD_A)\
**Post date:** [August 24, 2022, 3:08pm UTC](https://forum.alpaca.markets/t/exception-has-occurred-connecttimeout-httpsconnectionpool/10425/1 "2022-08-24T15:08:31Z")

</div>

This error started today and it seems others have had this issue in the past but there was no resolution other than 'temporary issue". Is there a resolution to this?

Exception has occurred: ConnectTimeout

HTTPSConnectionPool(host=‘paper-api.alpaca.markets’, port=443): Max retries exceeded with url: /v2/positions (Caused by ConnectTimeoutError(\<urllib3.connection.HTTPSConnection object at 0x000002508212F8B0\>, ‘Connection to paper-api.alpaca.markets timed out. (connect timeout=None)’))

---

<div class="post-metadata">

**Author:** ![KD\_A](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/kd_a/32/3431_2.png) [@KD\_A](https://forum.alpaca.markets/u/KD_A)\
**Post date:** [August 24, 2022, 3:50pm UTC](https://forum.alpaca.markets/t/exception-has-occurred-connecttimeout-httpsconnectionpool/10425/2 "2022-08-24T15:50:09Z")

</div>

Like all other times, it resolved on its own which makes me think this is an issue on Alpaca server side. I hope Alpaca addresses this.

---

<div class="post-metadata">

**Author:** ![KD\_A](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/kd_a/32/3431_2.png) [@KD\_A](https://forum.alpaca.markets/u/KD_A)\
**Post date:** [August 24, 2022, 3:53pm UTC](https://forum.alpaca.markets/t/exception-has-occurred-connecttimeout-httpsconnectionpool/10425/3 "2022-08-24T15:53:34Z")

</div>

Seems tied to ticker somehow. Another clue for Alpaca team.  
Worked without any issue with ACLS but MGM throws this error.

---

<div class="post-metadata">

**Author:** ![KD\_A](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/kd_a/32/3431_2.png) [@KD\_A](https://forum.alpaca.markets/u/KD_A)\
**Post date:** [August 25, 2022, 9:31pm UTC](https://forum.alpaca.markets/t/exception-has-occurred-connecttimeout-httpsconnectionpool/10425/4 "2022-08-25T21:31:51Z")

</div>

I am trying out these values in Alpaca REST to see if allowing more time and more retries to get the data helps somehow:

APCA\_RETRY\_MAX set to 5  
APCA\_RETRY\_WAIT set to 5

---

<div class="post-metadata">

**Author:** ![rockbusiness](https://avatars.discourse-cdn.com/v4/letter/r/e56c9b/32.png) [@rockbusiness](https://forum.alpaca.markets/u/rockbusiness)\
**Post date:** [August 26, 2022, 7:23am UTC](https://forum.alpaca.markets/t/exception-has-occurred-connecttimeout-httpsconnectionpool/10425/5 "2022-08-26T07:23:48Z")

</div>

I was also facing the problem on /v2/positions end point in my live account. In my case it was on SMCI ticker. Coincidentally I had updated my algo just a day before and was looking for problem in my update which I just couldn’t find.

---

<div class="post-metadata">

**Author:** ![KD\_A](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/kd_a/32/3431_2.png) [@KD\_A](https://forum.alpaca.markets/u/KD_A)\
**Post date:** [August 26, 2022, 2:20pm UTC](https://forum.alpaca.markets/t/exception-has-occurred-connecttimeout-httpsconnectionpool/10425/6 "2022-08-26T14:20:17Z")

</div>

I see the issue with /v2/positions as well. This morning I saw that call to get latest 1 minute candle took about 70 retries before a successful response. Retries are set for 5 seconds intervals.  
Alpaca servers are probably overwhelmed by the API calls or they are throttling these responses. Either way, it is a problem.

---

<div class="post-metadata">

**Author:** ![M\_T](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/m_t/32/3595_2.png) [@M\_T](https://forum.alpaca.markets/u/M_T)\
**Post date:** [December 27, 2022, 12:13am UTC](https://forum.alpaca.markets/t/exception-has-occurred-connecttimeout-httpsconnectionpool/10425/7 "2022-12-27T00:13:27Z")

</div>

Seem like I am having a similar issue. No code changes and suddenly it’s not longer working with this error. What end up happening for you?

---

<div class="post-metadata">

**Author:** ![M\_T](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/m_t/32/3595_2.png) [@M\_T](https://forum.alpaca.markets/u/M_T)\
**Post date:** [December 27, 2022, 1:14pm UTC](https://forum.alpaca.markets/t/exception-has-occurred-connecttimeout-httpsconnectionpool/10425/8 "2022-12-27T13:14:55Z")

</div>

Next morning, 1 call works, I get the data. Second call… this timeout… anyone at Alpaca have any feedback?
