# Connection are forcefully closed 10054

**URL:** <https://forum.alpaca.markets/t/connection-are-forcefully-closed-10054/3447>\
**Category:** Tutorials\
**Created:** [November 27, 2020, 6:40pm UTC](https://forum.alpaca.markets/t/connection-are-forcefully-closed-10054/3447 "2020-11-27T18:40:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![magniocean](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/magniocean/32/3420_2.png) [@magniocean](https://forum.alpaca.markets/u/magniocean)\
**Post date:** [November 27, 2020, 6:40pm UTC](https://forum.alpaca.markets/t/connection-are-forcefully-closed-10054/3447/1 "2020-11-27T18:40:52Z")

</div>

My alpaca connection was closed forcefully by error code 10054.  
The exception is  
requests.exceptions.ConnectionError: (‘Connection aborted.’, ConnectionResetError(10054, ‘An existing connection was forcibly closed by the remote host’, None, 10054, None))

and I could not connect again after the failure.

---

<div class="post-metadata">

**Author:** ![acarlsruh](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@acarlsruh](https://forum.alpaca.markets/u/acarlsruh)\
**Post date:** [November 27, 2020, 7:23pm UTC](https://forum.alpaca.markets/t/connection-are-forcefully-closed-10054/3447/2 "2020-11-27T19:23:26Z")

</div>

I can’t log in either. This happened the other day too. Hopefully this can be fixed soon.

---

<div class="post-metadata">

**Author:** ![Attila\_Barbocz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/attila_barbocz/32/3370_2.png) [@Attila\_Barbocz](https://forum.alpaca.markets/u/Attila_Barbocz)\
**Post date:** [December 11, 2021, 6:31pm UTC](https://forum.alpaca.markets/t/connection-are-forcefully-closed-10054/3447/3 "2021-12-11T18:31:29Z")

</div>

I have the same problem regularly.  
I get the exception after a few minutes of stable use.  
I’m using tha alpaca\_trade\_api.REST(APCA\_API\_KEY, APCA\_API\_SECRET, APCA\_API\_BASE\_URL, ‘v2’)  
What could be the reason?
