Help

0

Chat (polling process) doesn't work correctly. Error 500.

Avatar
Diego González

Hi everybody! I'm struggling with an 500 HTTP error fired by the polling proccess (used for chat messages) -as far as I can understand, beacuse the polling proccess can't connect to PostgreSQL (but Odoo main process can, though).


Symptom

Everything in Odoo works just fine, except ONLY for the IM: randomly and after some hours or even days, messagges doesn't refresh automatically and Odoo accuses of losing connection and getting it back automatically (sometimes the session even expires).


No IM message is lost: refreshing the webpage shows the latest IM messages.


Enviroment

  • VM witth 4 virtual processors and 16 GB of RAM

  • Ubuntu 20.04

  • Odoo 14 Community Edition

  • NGINX as a reverse proxy


Logs

I managed myself to set all logs to debug mode, and I found that the longpolling process is trying to connect to database "postgress", when my only database is called "odoo". I couldn't find where that could be setted (as I have in my odoo.conf, db_name = odoo)


This is the Odoo log in debug mode:


2021-07-21 20:46:45,888 71430 INFO ? longpolling: 192.168.200.30 - - [2021-07-21 20:46:45] "POST /longpolling/poll HTTP/1.0" 500 140 10.879160
2021-07-21 20:46:45,891 71430 DEBUG ? odoo.sql_db: SQL LOG from:
2021-07-21 20:46:45,891 71430 DEBUG ? odoo.sql_db: table: pg_user: 0:00:00.004050/1
2021-07-21 20:46:45,891 71430 DEBUG ? odoo.sql_db: SUM from:0:00:00.004050/1 [1146]
2021-07-21 20:46:45,891 71430 DEBUG ? odoo.sql_db: SUM into:0:00:00/1 [1146]
2021-07-21 20:46:45,898 71430 DEBUG ? odoo.sql_db: ConnectionPool(used=32/count=39/max=64) Create new connection
2021-07-21 20:46:45,898 71430 DEBUG ? odoo.sql_db: query: select datname from pg_database where datdba=(select usesysid from pg_user where usename=current_user) and not datistemplate and datallowc>
2021-07-21 20:46:45,898 71430 DEBUG ? odoo.sql_db: ConnectionPool(used=32/count=39/max=64) Give back connection to 'user=odoo password=xxx dbname=postgres host=localhost port=5432 sslmode=prefer'
2021-07-21 20:46:45,898 71430 DEBUG ? odoo.sql_db: ConnectionPool(used=31/count=38/max=64) Forgot connection to 'user=odoo password=xxx dbname=postgres host=localhost port=5432 sslmode=prefer'
2021-07-21 20:46:45,899 71430 DEBUG odoo odoo.sql_db: create serialized cursor to {'database': 'odoo', 'host': 'localhost', 'port': 5432, 'user': 'odoo', 'password': 'mypassword', 'sslmode': 'p>
2021-07-21 20:46:45,900 71430 DEBUG ? odoo.sql_db: create serialized cursor to {'database': 'postgres', 'host': 'localhost', 'port': 5432, 'user': 'odoo', 'password': 'mypassword', 'sslmode': '>
2021-07-21 20:46:45,901 71430 DEBUG odoo odoo.sql_db: ConnectionPool(used=32/count=38/max=64) Borrow existing connection to 'user=odoo password=xxx dbname=odoo host=localhost port=5432 sslmode=pre>
2021-07-21 20:46:45,901 71430 DEBUG odoo odoo.sql_db: query: SELECT base_registry_signaling.last_value,
base_cache_signaling.last_value
FROM base_registry_signaling, base_cache_signaling
2021-07-21 20:46:45,901 71430 INFO ? odoo.sql_db: Connection to the database failed


More info

You can get more info about configuration parameters and troubleshooting results here:

More info


Question

Can anybody help me with this issue? Is it with workers or db-connection oriented issue? Any idea will help.


Thanks!

Avatar
Discard