Hi <@U021J8TU753> Im trying to test out robustnes...
# ask-community
c
Hi @Prefect Im trying to test out robustness of the prefect server by running the following code
Copy code
@flow()
async def run_sample(testcase):
    await asyncio.gather(
        *(
            run_deployment(
                name="setup-kdb-robustness/setup_kdb_robustness",
                parameters={"testcase": "10 Runs Concurrently"},
            )
            for i in range(10)
        )
    )
It does run successfully, but I get this weird message when I do run it:
Copy code
15:44:59.516 | DEBUG   | prefect.client - Encountered retryable exception during request. Another attempt will be made in 1.762195377774828s. This is attempt 1/6.
Traceback (most recent call last):
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\httpx\_transports\default.py", line 60, in map_httpcore_exceptions
    yield
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\httpx\_transports\default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_async\connection_pool.py", line 253, in handle_async_request
    raise exc
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_async\connection_pool.py", line 237, in handle_async_request
    response = await connection.handle_async_request(request)
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_async\connection.py", line 90, in handle_async_request
    return await self._connection.handle_async_request(request)
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_async\http11.py", line 112, in handle_async_request
    raise exc
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_async\http11.py", line 91, in handle_async_request
    ) = await self._receive_response_headers(**kwargs)
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_async\http11.py", line 155, in _receive_response_headers
    event = await self._receive_event(timeout=timeout)
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_async\http11.py", line 205, in _receive_event
    raise RemoteProtocolError(msg)
httpcore.RemoteProtocolError: Server disconnected without sending a response.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\prefect\client\base.py", line 216, in _send_with_retry
    response = await request()
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\httpx\_client.py", line 1620, in send
    response = await self._send_handling_auth(
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\httpx\_client.py", line 1648, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\httpx\_client.py", line 1685, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\httpx\_client.py", line 1722, in _send_single_request
    response = await transport.handle_async_request(request)
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\httpx\_transports\default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "\\v-tm-qeq-05\Prefect_Env\lib\contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\httpx\_transports\default.py", line 77, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.RemoteProtocolError: Server disconnected without sending a response.
15:45:15.504 | DEBUG   | prefect.client - Encountered retryable exception during request. Another attempt will be made in 1.956168415170509s. This is attempt 1/6.
Traceback (most recent call last):
  File "\\v-tm-qeq-05\Prefect_Env\lib\asyncio\windows_events.py", line 457, in finish_recv
    return ov.getresult()
OSError: [WinError 64] The specified network name is no longer available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "\\v-tm-qeq-05\Prefect_Env\lib\asyncio\proactor_events.py", line 280, in _loop_reading
    data = fut.result()
  File "\\v-tm-qeq-05\Prefect_Env\lib\asyncio\windows_events.py", line 812, in _poll
    value = callback(transferred, key, ov)
  File "\\v-tm-qeq-05\Prefect_Env\lib\asyncio\windows_events.py", line 461, in finish_recv
    raise ConnectionResetError(*exc.args)
ConnectionResetError: [WinError 64] The specified network name is no longer available

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_exceptions.py", line 10, in map_exceptions
    yield
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\backends\asyncio.py", line 34, in read
    return await self._stream.receive(max_bytes=max_bytes)
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\anyio\_backends\_asyncio.py", line 1212, in receive
    raise self._protocol.exception
anyio.BrokenResourceError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\httpx\_transports\default.py", line 60, in map_httpcore_exceptions
    yield
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\httpx\_transports\default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_async\connection_pool.py", line 253, in handle_async_request
    raise exc
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_async\connection_pool.py", line 237, in handle_async_request
    response = await connection.handle_async_request(request)
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_async\connection.py", line 90, in handle_async_request
    return await self._connection.handle_async_request(request)
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_async\http11.py", line 112, in handle_async_request
    raise exc
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_async\http11.py", line 91, in handle_async_request
    ) = await self._receive_response_headers(**kwargs)
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_async\http11.py", line 155, in _receive_response_headers
    event = await self._receive_event(timeout=timeout)
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_async\http11.py", line 191, in _receive_event
    data = await self._network_stream.read(
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\backends\asyncio.py", line 36, in read
    return b""
  File "\\v-tm-qeq-05\Prefect_Env\lib\contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc)
httpcore.ReadError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\prefect\client\base.py", line 216, in _send_with_retry
    response = await request()
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\httpx\_client.py", line 1620, in send
    response = await self._send_handling_auth(
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\httpx\_client.py", line 1648, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\httpx\_client.py", line 1685, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\httpx\_client.py", line 1722, in _send_single_request
    response = await transport.handle_async_request(request)
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\httpx\_transports\default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "\\v-tm-qeq-05\Prefect_Env\lib\contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "C:\Users\cleung\AppData\Roaming\Python\Python38\site-packages\httpx\_transports\default.py", line 77, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ReadError
15:45:15.690 | DEBUG   | prefect.client - Encountered retryable exception during request. Another attempt will be made in 1.9267586944460113s. This is attempt 1/6.
Traceback (most recent call last):
  File "\\v-tm-qeq-05\Prefect_Env\lib\asyncio\windows_events.py", line 457, in finish_recv
    return ov.getresult()
OSError: [WinError 64] The specified network name is no longer available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "\\v-tm-qeq-05\Prefect_Env\lib\asyncio\proactor_events.py", line 280, in _loop_reading
    data = fut.result()
  File "\\v-tm-qeq-05\Prefect_Env\lib\asyncio\windows_events.py", line 812, in _poll
    value = callback(transferred, key, ov)
  File "\\v-tm-qeq-05\Prefect_Env\lib\asyncio\windows_events.py", line 461, in finish_recv
    raise ConnectionResetError(*exc.args)
ConnectionResetError: [WinError 64] The specified network name is no longer available

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\_exceptions.py", line 10, in map_exceptions
    yield
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\httpcore\backends\asyncio.py", line 34, in read
    return await self._stream.receive(max_bytes=max_bytes)
  File "\\v-tm-qeq-05\Prefect_Env\lib\site-packages\anyio\_backends\_asyncio.py", line 1212, in receive
    raise self._protocol.exception
anyio.BrokenResourceError
Is this the right way to implement running X number of deployments concurrently?