# External AWS RDS Postgres DB refreshment connection MAX AGE query

**URL:** <https://forum.ansible.com/t/external-aws-rds-postgres-db-refreshment-connection-max-age-query/37794>\
**Category:** AWX Project\
**Tags:** awx, aws\
**Created:** [March 21, 2023, 7:00pm UTC](https://forum.ansible.com/t/external-aws-rds-postgres-db-refreshment-connection-max-age-query/37794 "2023-03-21T19:00:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jagruti\_Belani](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@Jagruti\_Belani](https://forum.ansible.com/u/Jagruti_Belani)\
**Post date:** [March 21, 2023, 7:00pm UTC](https://forum.ansible.com/t/external-aws-rds-postgres-db-refreshment-connection-max-age-query/37794/1 "2023-03-21T19:00:11Z")

</div>

Hi Team,  
We are getting this Error as per awx container logs every sunday afternoon around 2 pm and it causes the Jobs to be stuck for two hours and then jobs failures occurs.

WARNING [6d97f00587c644f3aa02de547d109bb1] awx.conf.settings Database settings are not available, using defaults. error: server closed the connection unexpectedly\n",“stream”:“stderr”,“time”:“2023-03-19T01:02:25.109390476Z”}  
{“log”:“\u0009This probably means the server terminated abnormally\n”,“stream”:“stderr”,“time”:“2023-03-19T01:02:25.109429958Z”}  
{“log”:“\u0009before or while processing the request.\n”,“stream”:“stderr”,“time”:“2023-03-19T01:02:25.109435613Z”}  
{“log”:“\n”,“stream”:“stderr”,“time”:“2023-03-19T01:02:25.109439891Z”}  
{“log”:“2023-03-19 01:02:25,111 WARNING [6d97f00587c644f3aa02de547d109bb1] awx.conf.settings Database settings are not available, using defaults. error: connection already closed\n”,“stream”:“stderr”,“time”:“2023-03-19T01:02:25.111480038Z”}

- Do you think that specifying “CONN\_MAX\_AGE”: \_\_ parameter on the client side will mitigate this issue?
- How to add this config change in the AWX conf file?
- It would be great if you could provide the instructions. Can you also suggest if we need to update the Postgres session timeout on PG Server Side.  
Thanks,

Jagruti Belani

---

<div class="post-metadata">

**Author:** ![Jagruti\_Belani](https://avatars.discourse-cdn.com/v4/letter/j/898d66/32.png) [@Jagruti\_Belani](https://forum.ansible.com/u/Jagruti_Belani)\
**Post date:** [March 27, 2023, 9:17pm UTC](https://forum.ansible.com/t/external-aws-rds-postgres-db-refreshment-connection-max-age-query/37794/2 "2023-03-27T21:17:23Z")

</div>

Hi Team,  
Any update on this?  
Does management scheduled cleanup jobs cause these database errors?
