Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

500 Internal Server Error

By
Cidex
on 5/11/16, 9:58 AM 582 views

 Hi Community,

I get this "500 Internal Server Error", can anyone please help to find out how to solve this issue ?
Thanks
 

Odoo

Odoo Server Error

Traceback (most recent call last):
  File "/opt/odoo/odoo/openerp/http.py", line 539, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo/openerp/http.py", line 576, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo/openerp/http.py", line 312, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/service/model.py", line 118, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/http.py", line 309, in checked_call
    return self.endpoint(*a, **kw)
  File "/opt/odoo/odoo/openerp/http.py", line 805, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo/openerp/http.py", line 405, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/odoo/addons/web/controllers/main.py", line 944, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/odoo/addons/web/controllers/main.py", line 936, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/werkzeug/local.py", line 338, in __getattr__
    return getattr(self._get_current_object(), name)
  File "/opt/odoo/odoo/openerp/http.py", line 248, in cr
    self._cr = self.registry.cursor()
  File "/opt/odoo/odoo/openerp/modules/registry.py", line 272, in cursor
    return self._db.cursor()
  File "/opt/odoo/odoo/openerp/sql_db.py", line 609, in cursor
    return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
  File "/opt/odoo/odoo/openerp/sql_db.py", line 181, in __init__
    self._cnx = pool.borrow(dsn)
  File "/opt/odoo/odoo/openerp/sql_db.py", line 498, in _locked
    return fun(self, *args, **kwargs)
  File "/opt/odoo/odoo/openerp/sql_db.py", line 560, in borrow
    result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)
  File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, in connect
    connection_factory=connection_factory, async=async)
OperationalError: FATAL:  remaining connection slots are reserved for non-replication superuser connections
1

Grover Menacho

--Grover Menacho--
2523
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Systems Engineer + MBA

Grover Menacho
On 5/11/16, 10:53 AM

The problem is on your postgres max_connections limit... You need to increase that value and restart the server. It'll work.

If you are on Ubuntu: /etc/postgresql/9.x/main/postgresql.conf

1

Prakash Sharma

--Prakash Sharma--
815
| 2 1 4
Delhi, India
--Prakash Sharma--

I like to surround myself with brave, creative people.

My motivation for learning different technologies and algos drive me. I love challenges of a steep learning curve which I believe makes me a better learner. I have a strong desire to learn different technologies, which would enable me to become a full stack developer.

Prakash Sharma
On 5/11/16, 10:58 AM

For now just restart your PostgreSQL which will close the all active connection 
For permanent solution You either need to increase the max_connections

 configuration setting or (probably better)  use connection polling  (PgBouncer and Pgpool) to route a large number of user requests through a smaller connection pool.

0
Cidex
On 5/11/16, 11:13 AM

Hi Guys,

thank you for your reply. I'm running odoo on Ubuntu server in the cloud: 2 GB Memory / 2 CPUs / 40 GB SSD Disk. We are 10 users.

I have edit default installation postgresql.conf file as follow and this has generated the problem:

max_connections = 15

shared_buffers = 512MB

effective_cache_size = 1024MB

checkpoint_segments = 10

checkpoint_completion_target = 0.9

work_mem = 8MB

maintenance_work_mem = 32MB 

I will now change max_connections to 30 and let me ask you, the other configuration you see above do you think they are correct ?

Thank you


According to the forum guidelines please do not add another question in the answer section but please post a new question.

Ermin Trevisan
on 5/12/16, 1:38 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/11/16, 9:58 AM
Seen: 582 times
Last updated: 5/11/16, 1:51 PM