File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -330,6 +330,8 @@ final actor LambdaRuntimeClient: LambdaRuntimeClientProtocol {
330
330
try channel. pipeline. syncOperations. addHTTPClientHandlers ( )
331
331
// Lambda quotas... An invocation payload is maximal 6MB in size:
332
332
// https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html
333
+ // TODO: should we enforce this here ? What about streaming functions that
334
+ // support up to 20Mb responses ?
333
335
try channel. pipeline. syncOperations. addHandler (
334
336
NIOHTTPClientResponseAggregator ( maxContentLength: 6 * 1024 * 1024 )
335
337
)
@@ -364,6 +366,14 @@ final actor LambdaRuntimeClient: LambdaRuntimeClientProtocol {
364
366
channel. closeFuture. whenComplete { result in
365
367
self . assumeIsolated { runtimeClient in
366
368
runtimeClient. channelClosed ( channel)
369
+
370
+ // at this stage, we lost the connection to the Lambda Service,
371
+ // this is very unlikely to happen when running in a lambda function deployed in the cloud
372
+ // however, this happens when performance testing against the MockServer
373
+ // shutdown this runtime.
374
+ // The Lambda service will create a new runtime environment anyway
375
+ runtimeClient. logger. trace ( " Connection to Lambda API lost, exiting " )
376
+ exit ( - 1 )
367
377
}
368
378
}
369
379
You can’t perform that action at this time.
0 commit comments