aws-lambda-swift
aws-lambda-swift copied to clipboard
Random crash
This is a lambda function with proxy integration connected to an API Gateway. It randomly crashes with this log:
18:33:58
START RequestId: d78628da-a0c9-4e39-be97-5c0a604dadf9 Version: $LATEST
18:33:58
Fatal error: Error raised at top level: AWSLambdaSwift.RuntimeError.endpointError("The operation could not be completed"): file /home/buildnode/jenkins/workspace/oss-swift-5.0-package-linux-ubuntu-18_04/swift/stdlib/public/core/ErrorType.swift, line 200
18:33:58
Current stack trace:
18:33:58
0 libswiftCore.so 0x00007fefdf1387a0 _swift_stdlib_reportFatalErrorInFile + 115
18:33:58
1 libswiftCore.so 0x00007fefdf0739cc <unavailable> + 3463628
18:33:58
2 libswiftCore.so 0x00007fefdf073abe <unavailable> + 3463870
18:33:58
3 libswiftCore.so 0x00007fefdee6f31a <unavailable> + 1348378
18:33:58
4 libswiftCore.so 0x00007fefdf047ab2 <unavailable> + 3283634
18:33:58
5 libswiftCore.so 0x00007fefdeec4d6e <unavailable> + 1699182
18:33:58
6 myFunc 0x00007fefdfd75f80 <unavailable> + 335744
18:33:58
7 libc.so.6 0x00007fefdd7eeab0 __libc_start_main + 231
18:33:58
8 myFunc 0x00007fefdfd34e5a <unavailable> + 69210
It seems to have something to do with URLSession
on Linux. I have tried to print more info, but all I could get was: Foundation.URLError(_nsError: The operation could not be completed
.
Also, both HTTPResponse and data are empty.
@tonisuter thoughts?
@tonisuter I added a PR to fix this
I found the issue, it is related to the URLSessionConfiguration timeoutIntervalForRequest.