I got this problem when I ran this code:
# create deal from hubspot
for deal in hubspot_deals
exist_deal=self.env['crm.lead'].search([('hubspot_id', '=', deal['id'])], limit=1)orNone
new_deal=self.convert_to_crm_lead(client, deal)
if not exist_deal:
self.env['crm.lead'].create(new_deal)
else:
exist_deal.write(new_deal)
# unactive none hubspot
odoo_deals=self.env['crm.lead'].search([('hubspot_id', '=', None)])
for deal in odoo_deals:
deal.write({'active': False})
with lower number of hubspot_deals no lost connection appear but when I deploy it to prod with real data more than 100 hubspot_deals I face to this.
here are my config file:
db_maxconn = 64
db_user = odoo
db_name = False
log_db = True
log_db_level = warning
log_handler = :INFO
log_level = info
logfile = /home/ubuntu/logs/odoo-server.log
http_port = 80
limit_time_cpu = 600
limit_time_real = 1200