Title: Timeout while await api.metatrader_account_api.get_account(account_id) · Issue #7 · metaapi/metaapi-python-sdk · GitHub
Open Graph Title: Timeout while await api.metatrader_account_api.get_account(account_id) · Issue #7 · metaapi/metaapi-python-sdk
X Title: Timeout while await api.metatrader_account_api.get_account(account_id) · Issue #7 · metaapi/metaapi-python-sdk
Description: Since yesterday, my Heroku Python app has been timing out on this line: await api.metatrader_account_api.get_account(account_id) However, making the same request with curl succeeds. Because this is the first call before establishing the ...
Open Graph Description: Since yesterday, my Heroku Python app has been timing out on this line: await api.metatrader_account_api.get_account(account_id) However, making the same request with curl succeeds. Because this is...
X Description: Since yesterday, my Heroku Python app has been timing out on this line: await api.metatrader_account_api.get_account(account_id) However, making the same request with curl succeeds. Because this is...
Opengraph URL: https://github.com/metaapi/metaapi-python-sdk/issues/7
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Timeout while await api.metatrader_account_api.get_account(account_id)","articleBody":"Since yesterday, my Heroku Python app has been timing out on this line:\n\nawait api.metatrader_account_api.get_account(account_id)\n\nHowever, making the same request with curl succeeds.\n\nBecause this is the first call before establishing the connection, its failure prevents the rest of the program from running.\n\nAlso, the exact same program on my local machine is working fine...\n\nWhat could I be doing wrong?\n\nThis is the error I'm getting:\n\n```\n2025-10-21 09:13:25.286 | ERROR | src.utils.exception_logger:log_exception:101 - ❌ Failed to connect to Stream MetaAPI for f9d8bda2-a00d-4781-ba64-bb761aea3889\nException type: httpx.ConnectTimeout\nException message: \nException args: ('',)\nRequest: \u003cRequest('GET', 'https://mt-provisioning-api-v1.agiliumtrade.agiliumtrade.ai/users/current/accounts/f9d8bda2-a00d-4781-ba64-bb761aea3889')\u003e\nCaused by: ConnectTimeout: \nContext: ConnectTimeout: \nTraceback:\nTraceback (most recent call last):\n File \"/app/.heroku/python/lib/python3.13/site-packages/httpx/_transports/default.py\", line 101, in map_httpcore_exceptions\n yield\n File \"/app/.heroku/python/lib/python3.13/site-packages/httpx/_transports/default.py\", line 394, in handle_async_request\n resp = await self._pool.handle_async_request(req)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/app/.heroku/python/lib/python3.13/site-packages/httpcore/_async/connection_pool.py\", line 256, in handle_async_request\n raise exc from None\n File \"/app/.heroku/python/lib/python3.13/site-packages/httpcore/_async/connection_pool.py\", line 236, in handle_async_request\n response = await connection.handle_async_request(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n pool_request.request\n ^^^^^^^^^^^^^^^^^^^^\n )\n ^\n File \"/app/.heroku/python/lib/python3.13/site-packages/httpcore/_async/connection.py\", line 101, in handle_async_request\n raise exc\n File \"/app/.heroku/python/lib/python3.13/site-packages/httpcore/_async/connection.py\", line 78, in handle_async_request\n stream = await self._connect(request)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/app/.heroku/python/lib/python3.13/site-packages/httpcore/_async/connection.py\", line 124, in _connect\n stream = await self._network_backend.connect_tcp(**kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/app/.heroku/python/lib/python3.13/site-packages/httpcore/_backends/auto.py\", line 31, in connect_tcp\n return await self._backend.connect_tcp(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n ...\u003c5 lines\u003e...\n )\n ^\n File \"/app/.heroku/python/lib/python3.13/site-packages/httpcore/_backends/anyio.py\", line 113, in connect_tcp\n with map_exceptions(exc_map):\n ~~~~~~~~~~~~~~^^^^^^^^^\n File \"/app/.heroku/python/lib/python3.13/contextlib.py\", line 162, in __exit__\n self.gen.throw(value)\n ~~~~~~~~~~~~~~^^^^^^^\n File \"/app/.heroku/python/lib/python3.13/site-packages/httpcore/_exceptions.py\", line 14, in map_exceptions\n raise to_exc(exc) from exc\nhttpcore.ConnectTimeout\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File \"/app/src/infrastructure/multi_account_stream_service.py\", line 145, in _ensure_stream_connected\n account = await api.metatrader_account_api.get_account(account_id)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/app/.heroku/python/lib/python3.13/site-packages/metaapi_cloud_sdk/metaapi/metatrader_account_api.py\", line 121, in get_account\n account = await self._metatrader_account_client.get_account(account_id)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/app/.heroku/python/lib/python3.13/site-packages/metaapi_cloud_sdk/clients/metaapi/metatrader_account_client.py\", line 509, in get_account\n return await self._http_client.request(opts, 'get_account')\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/app/.heroku/python/lib/python3.13/site-packages/metaapi_cloud_sdk/clients/http_client.py\", line 113, in request\n return await self.request(options, type, retry_counter, end_time)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/app/.heroku/python/lib/python3.13/site-packages/metaapi_cloud_sdk/clients/http_client.py\", line 113, in request\n return await self.request(options, type, retry_counter, end_time)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/app/.heroku/python/lib/python3.13/site-packages/metaapi_cloud_sdk/clients/http_client.py\", line 113, in request\n return await self.request(options, type, retry_counter, end_time)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n [Previous line repeated 2 more times]\n File \"/app/.heroku/python/lib/python3.13/site-packages/metaapi_cloud_sdk/clients/http_client.py\", line 112, in request\n retry_counter = await self._handle_error(err, type, retry_counter, end_time)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/app/.heroku/python/lib/python3.13/site-packages/metaapi_cloud_sdk/clients/http_client.py\", line 165, in _handle_error\n raise error\n File \"/app/.heroku/python/lib/python3.13/site-packages/metaapi_cloud_sdk/clients/http_client.py\", line 89, in request\n response = await self._make_request(options)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/app/.heroku/python/lib/python3.13/site-packages/metaapi_cloud_sdk/clients/http_client.py\", line 134, in _make_request\n response = await client.send(req)\n ^^^^^^^^^^^^^^^^^^^^^^\n File \"/app/.heroku/python/lib/python3.13/site-packages/httpx/_client.py\", line 1629, in send\n response = await self._send_handling_auth(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n ...\u003c4 lines\u003e...\n )\n ^\n File \"/app/.heroku/python/lib/python3.13/site-packages/httpx/_client.py\", line 1657, in _send_handling_auth\n response = await self._send_handling_redirects(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n ...\u003c3 lines\u003e...\n )\n ^\n File \"/app/.heroku/python/lib/python3.13/site-packages/httpx/_client.py\", line 1694, in _send_handling_redirects\n response = await self._send_single_request(request)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/app/.heroku/python/lib/python3.13/site-packages/httpx/_client.py\", line 1730, in _send_single_request\n response = await transport.handle_async_request(request)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/app/.heroku/python/lib/python3.13/site-packages/httpx/_transports/default.py\", line 393, in handle_async_request\n with map_httpcore_exceptions():\n ~~~~~~~~~~~~~~~~~~~~~~~^^\n File \"/app/.heroku/python/lib/python3.13/contextlib.py\", line 162, in __exit__\n self.gen.throw(value)\n ~~~~~~~~~~~~~~^^^^^^^\n File \"/app/.heroku/python/lib/python3.13/site-packages/httpx/_transports/default.py\", line 118, in map_httpcore_exceptions\n raise mapped_exc(message) from exc\nhttpx.ConnectTimeout\n```\n\nPlease help, me and my customers are stuck on this and the Support service is not replying to my requests...","author":{"url":"https://github.com/chaskas","@type":"Person","name":"chaskas"},"datePublished":"2025-10-21T09:28:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/7/metaapi-python-sdk/issues/7"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:581f0a3a-f673-c6f9-6d32-4ec05028d13e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EC06:209C5F:3D7072E:54CF783:6977DD85 |
| html-safe-nonce | 7771c198a45ecb098a83ae19ecc4420b6fcafa1bcf1f3de02cb364c294cb775d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzA2OjIwOUM1RjozRDcwNzJFOjU0Q0Y3ODM6Njk3N0REODUiLCJ2aXNpdG9yX2lkIjoiOTA5NDAzNzEwNDMyNDIzODcyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8ec7fda8ce7079d06af67c4c73efc1952e808b0f742b5e677b2e530dbb1dedf5 |
| hovercard-subject-tag | issue:3535740609 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/metaapi/metaapi-python-sdk/7/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d053c044a8a9cdbd1df7e8ede2be5d5a9c601d7f435efc6b31bef8c7f7a38d36/metaapi/metaapi-python-sdk/issues/7 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d053c044a8a9cdbd1df7e8ede2be5d5a9c601d7f435efc6b31bef8c7f7a38d36/metaapi/metaapi-python-sdk/issues/7 |
| og:image:alt | Since yesterday, my Heroku Python app has been timing out on this line: await api.metatrader_account_api.get_account(account_id) However, making the same request with curl succeeds. Because this is... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | chaskas |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8909f95e78dc1ccc1b9acf9d5c963c2515579e48d2898151cf571437facd1d7b |
| turbo-cache-control | no-preview |
| go-import | github.com/metaapi/metaapi-python-sdk git https://github.com/metaapi/metaapi-python-sdk.git |
| octolytics-dimension-user_id | 150213295 |
| octolytics-dimension-user_login | metaapi |
| octolytics-dimension-repository_id | 715944976 |
| octolytics-dimension-repository_nwo | metaapi/metaapi-python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 715944976 |
| octolytics-dimension-repository_network_root_nwo | metaapi/metaapi-python-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d6b13f6e4712dc1242cf12b5e75dec8b1bf3a9ab |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width