faustinoaq changed the topic of #amber to: Welcome to Amber Framework community! | https://amberframework.org | Developer happiness, productivity and bare metal performance | GH: https://github.com/amberframework | Docs: https://docs.amberframework.org | Gitter: https://gitter.im/amberframework/amber | IRC Logger: https://irclog.whitequark.org/amber | Amber::Server.start
<FromGitter> <damianham> I keep getting **(DB::PoolRetryAttemptsExceeded)** errors. I restart my production server at 4am every day but as the number of users is increasing this problem is still happening in the early evening when there is peak usage. I also got this problem on my local development instance which has very few requests but runs for a long time. I have just increased the max number of connections in postgres to 300. Is
<FromGitter> ... there anything else I can do to avoid getting this error.
<FromGitter> <Blacksmoke16> iirc something like this was reported in crystal gitter
<FromGitter> <Blacksmoke16> ☝️ December 27, 2020 2:59 PM (https://gitter.im/crystal-lang/crystal?at=5fe8e797c746c6431cdd3806)
<FromGitter> <Blacksmoke16> prob worth reporting somewhere
<FromGitter> <damianham> @drujensen @elorest I think the issue might be in granite/src/adapter/base.cr. A database connection is opened and stored in an instance variable rather than yielding the connection to a block and as far as I can see is never closed. The online docs for crystal DB state that you can use a **non yielding DB.open method as long as Database#close is called at the end.** Since DB:Pool takes care of connection pools
<FromGitter> ... is there a need to store the connection in an instance variable?
raz has left #amber ["Textual IRC Client: www.textualapp.com"]