randyf
December 1, 2021, 1:11am
1
Using the Third Edition example for deploying to Heroku with Postgres, I get a compile warning.
BTW. Everything compiles fine (since it is just a warning), but it would be great to get a completely clean compile.
> warning: 'forClient(cipherSuites:minimumTLSVersion:maximumTLSVersion:certificateVerification:trustRoots:certificateChain:privateKey:applicationProtocols:shutdownTimeout:keyLogCallback:)' is deprecated: renamed to 'makeClientConfiguration()'
config.tlsConfiguration = .forClient(
note: use 'makeClientConfiguration()' instead
config.tlsConfiguration = .forClient(
^~~~~~~~~
makeClientConfiguration
hshere
October 27, 2023, 8:20pm
2
There is updated code here for vapor 4
But that code requires newer versions of fluent and fluent-postgres-driver
Although the code compiles without warnings and works locally, but i could not get it to work in my heroku deployment. I would get 503 errors after trying the new code
0xtim
October 27, 2023, 9:39pm
3
What’s in the Heroku logs?
hshere
October 28, 2023, 12:03am
4
2023-10-27T19:37:53.002495+00:00 app[web.1]: 0x5649394748b9, closure #1 (NIOPosix.NIOThread) → () in static NIOPosix.MultiThreadedEventLoopGroup.(setupThreadAndEventLoop in _C2B1528F4FBA68A3DBFA89DBAEBE9D4D)(name: Swift.String, parentGroup: NIOPosix.MultiThreadedEventLoopGroup, selectorFactory: () throws → NIOPosix.Selector<NIOPosix.NIORegistration>, initializer: (NIOPosix.NIOThread) → ()) → NIOPosix.SelectableEventLoop at /tmp/build_8aae7050/.build/checkouts/swift-nio/Sources/NIOPosix/MultiThreadedEventLoopGroup.swift:114
2023-10-27T19:37:53.002512+00:00 app[web.1]: 0x564939477e6e, partial apply forwarder for closure #1 (NIOPosix.NIOThread) → () in static NIOPosix.MultiThreadedEventLoopGroup.(setupThreadAndEventLoop in _C2B1528F4FBA68A3DBFA89DBAEBE9D4D)(name: Swift.String, parentGroup: NIOPosix.MultiThreadedEventLoopGroup, selectorFactory: () throws → NIOPosix.Selector<NIOPosix.NIORegistration>, initializer: (NIOPosix.NIOThread) → ()) → NIOPosix.SelectableEventLoop at /tmp/build_8aae7050/:0
2023-10-27T19:37:53.002688+00:00 app[web.1]: 0x56493947a1e9, reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed NIOPosix.NIOThread) → () to @escaping @callee_guaranteed (@in_guaranteed NIOPosix.NIOThread) → (@out ()) at /tmp/build_8aae7050/:0
2023-10-27T19:37:53.002719+00:00 app[web.1]: 0x5649394b0a3c, closure #1 (Swift.Optional<Swift.UnsafeMutableRawPointer>) → Swift.Optional<Swift.UnsafeMutableRawPointer> in static NIOPosix.ThreadOpsPosix.run(handle: inout Swift.Optional<Swift.UInt>, args: NIOPosix.Box<(body: (NIOPosix.NIOThread) → (), name: Swift.Optional<Swift.String>)>, detachThread: Swift.Bool) → () at /tmp/build_8aae7050/.build/checkouts/swift-nio/Sources/NIOPosix/ThreadPosix.swift:112
2023-10-27T19:37:53.002728+00:00 app[web.1]: 0x7f010e356ac2
2023-10-27T19:37:53.002736+00:00 app[web.1]: 0x7f010e3e8a3f
2023-10-27T19:37:53.002737+00:00 app[web.1]: 0xffffffffffffffff
2023-10-27T19:37:53.010752+00:00 heroku[router]: at=error code=H13 desc=“Connection closed without response” method=GET path=“/” host=hms-til-fcb3092e9d4e.herokuapp.com request_id=ce3cb049-39b6-4e35-ade1-93c7abf00876 fwd=“104.188.42.75” dyno=web.1 connect=1ms service=146ms status=503 bytes=0 protocol=https
2023-10-27T19:37:53.125788+00:00 heroku[web.1]: Process exited with status 132
0xtim
October 28, 2023, 12:23am
5
That’s a partial stack trace - there’ll be the actual error above